<br><br><div class="gmail_quote">On Wed, Jul 16, 2008 at 10:46 AM, Javier Reyes &lt;<a href="mailto:jreyes@gmail.com">jreyes@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr">Hi Eliot,<br><br>I have tried wrapping snapshot:andQuit:embedded: in different ways freezing the system all the time. The minimal intervention I could figure out from your message has been this ( I think I understand now why I never thought about writing something like BrouHaHa ;-)</div>
</blockquote><div><br></div><div>:) &nbsp;You never know how easy it is until you try, try and try again. &nbsp;I didn&#39;t just write BrouHaHa. I failed to write it a number of times until I got it right. &nbsp;One learns from mistakes. &nbsp;Anyone who says they just get it right first time either has a selective memory or has never done anything non-trivial :)</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><br>
<div><br><br>------------<br>snapshot:andQuit:embedded:<br>...<br>....<br>...<br>&nbsp;&nbsp;&nbsp; Smalltalk <b>myProcessStartUpList:</b> resuming == true.<br>&nbsp;&nbsp;&nbsp; resuming == true ifTrue:[<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self setPlatformPreferences.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self recordStartupStamp].<br>

&nbsp;&nbsp;&nbsp; Smalltalk isMorphic ifTrue: [SystemWindow wakeUpTopWindowUponStartup].<br>&nbsp;&nbsp;&nbsp; &quot;Now it&#39;s time to raise an error&quot;<br>&nbsp;&nbsp;&nbsp; resuming == nil ifTrue: [self error:&#39;Failed to write image file (disk full?)&#39;].<br>

&nbsp;&nbsp;&nbsp; ^ resuming! !<br><br>------------<br><br><b>myProcessStartUpList:</b> resuming<br>&nbsp;&nbsp;&nbsp; &quot;Send #startUp to each class that needs to run initialization after a snapshot.&quot;<br><br>&nbsp;&nbsp;&nbsp; self send: #startUp: toClassesNamedIn: (<b>self lista</b>) with: resuming.<br>

! !<br><br></div>----------<br><br><div class="gmail_quote">!SystemDictionary methodsFor: &#39;snapshot and quit&#39; stamp: &#39;jr 7/16/2008 19:17&#39;!<br><b>lista</b><br>(StartUpList select: [:a| (a==#<b>MyAppSingletonClass)</b> not]).<br>

! !<br><br>----------<br>Best,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Javier<br><br><br><br><br><br>On Wed, Jul 16, 2008 at 5:27 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<br><br><div class="gmail_quote"><div>On Wed, Jul 16, 2008 at 8:00 AM, Javier Reyes &lt;<a href="mailto:jreyes@gmail.com" target="_blank">jreyes@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">


<div dir="ltr">Hello All,<br><br>żIs there a way to save the current image without invoking all the registered startup methods immediately ? </div></blockquote><div><br></div></div><div>Write your own surround to the snapshot primitive and you can make the startup do whatever you want. &nbsp;Have a look at&nbsp;SystemDictionary&gt;&gt;snapshot:andQuit:embedded: and what it does after it calls snapshotPrimitive.</div>


<div><br></div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div dir="ltr"><br><br>Best,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Javier Reyes<br>

</div>
<br><br>
<br></blockquote></div><br>
<br><br>
<br></blockquote></div><br></div>
<br><br>
<br></blockquote></div><br>