<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 10:50 AM, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>&gt;</span> wrote:<br>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If I&#39;m developing a new app, I can already choose a different name to<br>
avoid conflict.  I want Environments to be useful when there are two<br>
_existing_ legacy apps that have _already_ chosen to use the same<br>
name.  Is that use-case handled by Environments?  My guess is, it is,<br>
as long as the names are changed only in the downstream (e.g.,<br>
calling) Environment, it is.<br>
<br>
For example, if WASession and MagmaSession had both been simply named<br>
&quot;Session&quot; from the very beginning but I want MySeasideMagmaApp to use<br>
them both, then I could import them each into their own Environment.<br>
Then I could import those two Environments into a third<br>
&quot;MySeasideMagmaApp&quot; Environment and prepend a prefix to one or both of<br>
them.  Since Magma is in its own environment, its own references to<br>
&quot;Session&quot; are correct.  And since Seaside is in its own environment,<br>
its own referrences to Session are correct too (Seaside Sessions).<br>
Finally, since MySeasideMagmaApp is in ITS own Environment, it can<br>
refer to MagmaSession and SeasideSession because I prepended &quot;Magma&quot;<br>
and &quot;Seaside&quot; prefixes.  Is this a correct understanding?<br></blockquote><div><br></div><div>Yes. That&#39;s exactly right. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hm, seems like there&#39;ll need to be some way to set up Environments as<br>
part of the package-loading process, so they&#39;ll be loaded into the<br>
correct Environments...   Preamble script?<br></blockquote><div><br></div><div>No a preamble because that would make the code know about environments,</div><div>which (as you pointed out) we don&#39;t want. For manual loading, we need to make</div>
<div>it possible to open an MC browser for a specific environment, so you can manage</div><div>the code it contains.</div><div><br></div><div>Load scripts should be able to set up environments programmatically and load </div>
<div>packages into them. There isn&#39;t a nice API for that yet. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
PS -- I didn&#39;t mean to inundate you with questions.  I probably need<br>
to dig into it and actually try it out.  I was just trying to get a<br>
feel for the use-cases and usage conventions, so I knew where to<br>
start<br></blockquote><div><br></div><div>No problem. The core environments code pretty good, but actually using them is</div><div>still a hassle because the tools don&#39;t have support yet. </div><div><br></div><div>Right now I&#39;m working on making Workspace environment-aware. Instead of a pool</div>
<div>dictionary for local bindings, it&#39;ll have its own environment. Be default it&#39;ll import</div><div>Smalltalk, but you can import other environments as well.  That&#39;s exposing all sorts </div><div>of little issues that I&#39;m working through. </div>
<div><br></div><div>Colin</div><div><br></div><div> </div></div></div></div>