[squeak-dev] Environment changes in the Inbox

H. Hirzel hannes.hirzel at gmail.com
Tue Mar 7 10:28:51 UTC 2017


Or even better, some entries in the 'Help System'

It should include the 'Hello World' example from October 2016.

http://wiki.squeak.org/squeak/6557

I volunteer to help.

--Hannes

On 3/6/17, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> 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
>


More information about the Squeak-dev mailing list