[squeak-dev] Environments update

Colin Putney colin at wiresong.com
Mon Mar 4 17:16:35 UTC 2013


On Sun, Mar 3, 2013 at 6:18 PM, H. Hirzel <hannes.hirzel at gmail.com> wrote:


> What does
>      importSelf;
>      exportSelf;
>

A newly created environment has no imports and no exports. If you compile a
method (or doIt) in such an environment, all bindings will be undeclared,
and if you import it into another environment, none of its binding will be
visible.

To be able to resolve bindings inside the environment, you need imports.
#importSelf tells the environment to import its own contents, to make
classes and globals defined in the environment visible to methods compiled
in the environment. #exportSelf tells it to make all its contents visible
to the outside world.

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130304/8aa23f57/attachment.htm


More information about the Squeak-dev mailing list