When i call a public shared method from outside, ⎕THIS is a reference to the class.
If I call this shared method from an instance method of the same class, ⎕THIS is a reference to the instance.
As a workaround I use in my static method (↑⊃⊃⎕CLASS ⎕THIS) instead simply ⎕THIS.
Why is ⎕THIS in a shared method not deterministic
-
- Posts: 2
- Joined: Wed Apr 22, 2020 2:17 pm
-
- Posts: 439
- Joined: Wed Oct 01, 2008 9:39 am
Re: Why is ⎕THIS in a shared method not deterministic
Hi Manuel,
I think this is working as designed--that when you are in an instance method, the current namespace that ⎕THIS will refer to is that instance.
Regards,
Vince
I think this is working as designed--that when you are in an instance method, the current namespace that ⎕THIS will refer to is that instance.
Regards,
Vince