<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"><<a href="mailto:ma.chris.m@gmail.com" target="_blank">ma.chris.m@gmail.com</a>></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 'My<br>
App' Environment,<br>
<div class=""><br>
| magmaEnv appEnv |<br>
magmaEnv := Environment withName: 'Magma'.<br>
magmaEnv exportSelf.<br>
<br>
appEnv := Environment withName: 'My App'.<br>
appEnv<br>
import: magmaEnv removingPrefix: 'Ma';<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's not what would happen though -- because that<br>
would require Environments to go making source-code updates and I'm<br>
doubtful it does that. Environments is just about multiple<br>
SystemDictionray's with different keys to support prettier /<br>
non-conflicting names. That's my high-level understanding of what<br>
Environments does, but I don't grok yet how it's supposed to be<br>
properly used..</blockquote><div><br></div><div><br></div><div>That's exactly right. Environments swizzles bindings around so that you can refer</div><div>to classes by whatever names you want, but it doesn't change your source code to </div>
<div>actually use those names. </div><div><br></div><div>If you've got a pre-existing MyApp that refers to Magma classes via prefixed names,</div><div>when you load it into appEnv, it won't have any changes, but all those references</div>
<div>will be broken. You'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're starting your app from scratch, it's less of an issue. :-)</div>
<div><br></div><div>Colin</div></div></div></div>