<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 7, 2014 at 8:51 PM, Chris Muller <span dir="ltr">&lt;<a href="mailto:ma.chris.m@gmail.com" target="_blank">ma.chris.m@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hm, okay.  So when I ran that example code earlier to create the &#39;My<br>
App&#39; Environment,<br>
<div class=""><br>
| magmaEnv appEnv |<br>
magmaEnv := Environment withName: &#39;Magma&#39;.<br>
magmaEnv exportSelf.<br>
<br>
appEnv := Environment withName: &#39;My App&#39;.<br>
appEnv<br>
  import: magmaEnv removingPrefix: &#39;Ma&#39;;<br>
  importSelf.<br>
<br>
</div>and then loaded Magma into its environment and My App into the My App<br>
environment, if I were to immediately then press the Changes button in<br>
the MC browser for My App, one might assume they should find lots of<br>
changes due to the stripping of the prefixes from the existing<br>
references to MaObjectSerializer now being without the prefix.<br>
<br>
Something tells me that&#39;s not what would happen though -- because that<br>
would require Environments to go making source-code updates and I&#39;m<br>
doubtful it does that.  Environments is just about multiple<br>
SystemDictionray&#39;s with different keys to support prettier /<br>
non-conflicting names.  That&#39;s my high-level understanding of what<br>
Environments does, but I don&#39;t grok yet how it&#39;s supposed to be<br>
properly used..</blockquote><div><br></div><div><br></div><div>That&#39;s exactly right. Environments swizzles bindings around so that  you can refer</div><div>to classes by whatever names you want, but it doesn&#39;t change your source code to </div>
<div>actually use those names. </div><div><br></div><div>If you&#39;ve got a pre-existing MyApp that refers to Magma classes via prefixed names,</div><div>when you load it into appEnv, it won&#39;t have any changes, but all those references</div>
<div>will be broken. You&#39;ll need to rewrite the source code to use the new names. (Should</div><div>be fairly easy with the RB). </div><div><br></div><div>If you&#39;re starting your app from scratch, it&#39;s less of an issue. :-)</div>
<div><br></div><div>Colin</div></div></div></div>