thisContext question
Bergel Alexandre
bergel at iam.unibe.ch
Sun Apr 28 14:36:47 UTC 2002
Right !
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Test class>>run
Transcript show: thisContext sender asString
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Sounds better.
Thanks !
Alexandre
On Sun, Apr 28, 2002 at 04:30:51PM +0200, Joern Eyrich wrote:
> Hi Alexande,
>
> cool question.
>
> I think it's like this:
> You are looking at the context after it has been returned from.
> In the process of returning, the sender and ip slots of the context are nilled out, see
>
> "
> Interpreter>>returnValue:to:
>
> ...
> "zap exited contexts so any future attempted use will be caught"
> self storePointerUnchecked: SenderIndex ofObject: thisCntx withValue: nilOop.
> ...
> "
>
> If you use
> "
> Test class>>run
> ^ thisContext sender
> "
> instead you will get the sender context back from executing "Test run" in a workspace; of course, this also has already been returned from by then
>
> Joern
>
> Bergel Alexandre wrote:
> >
> > Hello,
> >
> > Let assume I have :
> >
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > Test class>>run
> > ^thisContext
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >
> > And if I perform, from a workspace : Test run sender
> > I get nil.
> >
> > Why ?
> >
> > Regards,
> > Alexandre
> >
> > --
> > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._
> > Bergel Alexandre http://www.iam.unibe.ch/~bergel
> > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._
Bergel Alexandre http://www.iam.unibe.ch/~bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^
More information about the Squeak-dev
mailing list
|