[squeak-dev] Environments question

Chris Muller ma.chris.m at gmail.com
Tue Apr 8 01:51:39 UTC 2014

Hm, okay.  So when I ran that example code earlier to create the 'My
App' Environment,

| magmaEnv appEnv |
magmaEnv := Environment withName: 'Magma'.
magmaEnv exportSelf.

appEnv := Environment withName: 'My App'.
  import: magmaEnv removingPrefix: 'Ma';

and then loaded Magma into its environment and My App into the My App
environment, if I were to immediately then press the Changes button in
the MC browser for My App, one might assume they should find lots of
changes due to the stripping of the prefixes from the existing
references to MaObjectSerializer now being without the prefix.

Something tells me that's not what would happen though -- because that
would require Environments to go making source-code updates and I'm
doubtful it does that.  Environments is just about multiple
SystemDictionray's with different keys to support prettier /
non-conflicting names.  That's my high-level understanding of what
Environments does, but I don't grok yet how it's supposed to be
properly used..

On Mon, Apr 7, 2014 at 8:19 PM, Colin Putney <colin at wiresong.com> wrote:
> On Mon, Apr 7, 2014 at 8:10 PM, Chris Muller <ma.chris.m at gmail.com> wrote:
>> Now say I save a new MC version of "My App" package.  I've made a
>> couple of new references to ObjectSerializer.  Now I load that version
>> into a clean image without creating any environments at all.  Will I
>> see ObjectSerializer or MaObjectSerializer in the code?
> You'll see ObjectSerializer.
> Colin

More information about the Squeak-dev mailing list