<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 7, 2014 at 1:40 PM, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@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">As I was programming in Squeak today, I typed a class name, including<br>
its two-letter prefix.  I wondered, could Environments be used to,<br>
dynamically, only in transient memory, remove a prefix from a package?<br>
 It would be nice to enjoy typing and reading the pure, unprefixed<br>
class names, but would want to keep the original prefixes when I save<br>
a new version of the package.<br></blockquote><div><br></div><div>I&#39;m not sure what you mean by &quot;dynamically, only in transient memory&quot; here.</div><div><br></div><div>You could certainly load a package that has prefixed-class-names and refer to those classes without prefixes. It would be something like this:</div>
<div><br></div><div>| magmaEnv appEnv |</div><div>magmaEnv := Environment withName: &#39;Magma&#39;.</div><div>magmaEnv exportSelf.</div><div><br></div><div>appEnv := Environment withName: &#39;My App&#39;.</div><div>appEnv</div>
<div>  import: magmaEnv removingPrefix: &#39;Ma&#39;;</div><div>  importSelf.</div><div><br></div><div>Load your prefixed Magma classes into magmaEnv, and then write your app code in appEnv referring to Magma classes without prefixes.</div>
<div><br></div><div>Colin</div><div><br></div><div><br></div></div></div></div>