MessageAsTempNode>>scope question

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

MessageAsTempNode>>scope question

Stéphane Rollandin
hello list,


if we do the following in a workspace:

[| a |
        a := 1.
        Compiler new evaluate: '1+a' in: thisContext to: nil
] value

.. it returns 2
now if we open a Transcript and do this:

[| a |
        a := 1.
      Transcript show:
                (Compiler new evaluate: '1+a' in: thisContext to: nil)
] fork

.. we get an 'out of scope' notification


this is very surprising to me, so I tried my best to understand what is
happening and now I wonder:

1) is it an undesirable limitation of the Parser, or am I missing
something ?

2) if we change MessageAsTempNode>>scope so that it returns 0 or 1, the
second example works fine. what would be the other (undesirable) effects
for such a change?

3) is this the same issue as
http://www.nabble.com/-GRR--OutOfScopeNotification-catching-caught-me-t1414869.html
(discussed here a few months ago) ?

4) should we do something about it ?


thanks,

Stef