[squeak-dev] Environment changes in the Inbox

Bert Freudenberg bert at freudenbergs.de
Wed Mar 22 15:21:39 UTC 2017


On Wed, Mar 22, 2017 at 12:52 PM, H. Hirzel <hannes.hirzel at gmail.com> wrote:

> Hello Jakob
>
> A follow up on the previous mail to find out more which Environment
> support now can be made use of.
>
>
> I understand that the I can choose an environment in the left pane of
> a Monticello Browser (see screen shot).
>
> 1. I have created the environment with
>
>     henv := Environment withName: 'HJHenvironment'.
>     henv import: Smalltalk globals.
>     henv importSelf.
>     henv exportSelf.
>
> 2. Then I choose the environment 'HJHenvironment' in the Monticello Browser
>

That's not how it works (yet) ... You need to create an empty WorkingCopy
for your package first by pressing the "+Package" button. Then you can use
the menu to chose the environment for the package you selected.


> 3. Then I load an MCZ package and open a SystemBrowser.
>
> Question:
> Are these classes loaded into the new environment?
>
> Actually it see the classes if I open a SystemBrowser.
>

That means they were not loaded into the environment.

If you did it as above, you should not see the classes in the
SystemBrowser, only their empty category names (because categories are not
"environmentized" yet).


> How do I use this 'minimal support' successfully?
>

As indicated above, and manually in a workspace. E.g. you can inspect your
"henv" after loading your package and see that the class declarations are
in its 'declarations' dictionary.

I don't think there is a way right now to actually see an environment's
classes in a browser.

The only use for the environments so far is that it lets you build an image
with packages that have conflicting class names. This was not possible
before at all, so it's a step forward. But we need more tool support,
especially for browsing an environment, and for directly specifying an
environment when loading a package (without having to manually create it
first).

- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170322/024189fc/attachment.html>


More information about the Squeak-dev mailing list