<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Let me see if I understand ...</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Mar 2, 2017 at 3:45 AM, Jakob Reschke <span dir="ltr"><<a href="mailto:jakob.reschke@student.hpi.de" target="_blank">jakob.reschke@student.hpi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
1. prepare the environment in a workspace, because there are no tools for it:<br>
<br>
   env := Environment named: #NewProjectWithPharoBindings.<br></blockquote><div><br></div><div>This creates a new empty environment.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
   env import: Smalltalk globals.<br></blockquote><div><br></div><div>This makes all current classes available inside the new environment.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
   env from: Smalltalk globals import: { #FSFilesystem -> #FileSystem.<br>
#FSPath -> #Path. "..." }<br></blockquote><div><br></div><div>This makes the FS classes (which you loaded previously) available under the non-prefixed name, too.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
   env importSelf; </blockquote><div><br></div><div>Makes future declarations in this environment visible to itself.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">exportSelf.</blockquote><div><br></div><div>Makes future changes in this environment visible to other environments that imported it.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2. open a Workspace that "lives" in the new environment:<br>
<br>
  env beCurrentDuring: [Workspace open]<br>
<br>
  ...and change its title to remember its purpose.<br></blockquote><div><br></div><div>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?</div><div><br></div><div>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).</div><div><br></div><div>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?</div><div><br></div><div>- Bert - </div></div></div></div>