<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
On 22.11.2009, at 05:07, Rob Rothwell wrote:<br>
&gt; Hello...<br>
&gt;<br>
&gt; For scripting purposes, I just want to be able to do something like:<br>
&gt;<br>
&gt; SmalltalkImage current quit: errorCode.<br>
&gt;<br>
&gt; So that in the VM I can essentially do:<br>
&gt;<br>
&gt; return errorCode.<br>
&gt;<br>
&gt; at the end of sqMain?<br>
&gt;<br>
&gt; Any pointers on how to push a value BACK to the VM?  I have only barely dabbled with adding some custom menu commands to the VM long ago, and have no idea where to start.<br>
<br>
You would need to add a primitive to set the errorCode. This would be stored in an interpreter variable. Then the VM&#39;s exit code would be modified to retrieve that value.<br></blockquote><div><br></div><div>So, unlike all the other examples out there, this would probably be best if it were NOT an external plugin?  Would you be able to use VMMaker to do this (I&#39;ve never done that before), or just go hand code some stuff?</div>
<div><br></div><div>Do you think this seems like a generically pretty useful think to add to the VM?  If so, I suppose I would like to do it right!</div><div><br></div><div>I hacked a temporary solution together with batch files and unique file names, but it feels a little sloppy.</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Rob</div></div>