[squeak-dev] Environment changes in the Inbox

Eliot Miranda eliot.miranda at gmail.com
Mon Mar 6 19:00:09 UTC 2017


Hi Both,

Can this conversation be captured as something like a workspace text which
can be opened from the Help menu in the menu bar?  I'd love to see
something like "Working With Environments" underneath "Working With Squeak".

On Thu, Mar 2, 2017 at 3:06 PM, Bert Freudenberg <bert at freudenbergs.de>
wrote:

> Let me see if I understand ...
>
> On Thu, Mar 2, 2017 at 3:45 AM, Jakob Reschke <
> jakob.reschke at student.hpi.de> wrote:
>
>>
>> 1. prepare the environment in a workspace, because there are no tools for
>> it:
>>
>>    env := Environment named: #NewProjectWithPharoBindings.
>>
>
> This creates a new empty environment.
>
>
>>    env import: Smalltalk globals.
>>
>
> This makes all current classes available inside the new environment.
>
>
>>    env from: Smalltalk globals import: { #FSFilesystem -> #FileSystem.
>> #FSPath -> #Path. "..." }
>>
>
> This makes the FS classes (which you loaded previously) available under
> the non-prefixed name, too.
>
>
>>    env importSelf;
>
>
> Makes future declarations in this environment visible to itself.
>
>
>> exportSelf.
>
>
> Makes future changes in this environment visible to other environments
> that imported it.
>
>
>> 2. open a Workspace that "lives" in the new environment:
>>
>>   env beCurrentDuring: [Workspace open]
>>
>>   ...and change its title to remember its purpose.
>>
>
> Yoshiki and I tried that but evaluating code still appears to use the
> Smalltalk environment. We had to change the evaluateSelectionAndDo: method
> in the Morphic package to use the model's environment. Is that a change you
> missed?
>
> In general it appears to be working well, although the tool support is
> minimal for now. It would be useful if environment-aware tools indicated
> the current environment (if it is not the default).
>
> The general metaphor seems to be that an environment just replaces the
> global Smalltalk dictionary with its own, but the code in general doesn't
> even have to be aware of the existence of other environments. This is in
> contrast to how other systems handle modules and namespaces. Would you
> think this is a fair characterization?
>
> - Bert -
>
>
>
>


-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170306/731a7dfe/attachment.html>


More information about the Squeak-dev mailing list