accessing the stack

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

accessing the stack

Niko Matsakis
Is it possible to gain access to the current stack context (i.e.,  
MethodContext or BlockContext) in Squeak?


thanks,
Niko

Reply | Threaded
Open this post in threaded view
|

Re: accessing the stack

Nicolas Cellier-3
Niko Matsakis a écrit :
> Is it possible to gain access to the current stack context (i.e.,
> MethodContext or BlockContext) in Squeak?
>
>
> thanks,
> Niko
>
>

Use special variable thisContext


Reply | Threaded
Open this post in threaded view
|

Re: accessing the stack

Trygve
In reply to this post by Niko Matsakis
Yes, easily. 'thisContext' is a context variable known in every method.  Its value is always the MethodContext which is executing the method.

'thisContext' is a variable name treated in the same way as 'self', 'super', etc. See VariableNode>>initialize.

Hope this helps
--Trygve

On 16.12.2007 09:44, Niko Matsakis wrote:
Is it possible to gain access to the current stack context (i.e., MethodContext or BlockContext) in Squeak?


thanks,
Niko




-- 

Trygve Reenskaug      mailto: [hidden email]
Morgedalsvn. 5A       http://folk.uio.no/trygver
N-0378 Oslo           Tel: (+47) 22 49 57 27
Norway