Hi Bert,<br><br>Thanks for the explanation. Now its cristal clear to me. <br><br>All the best,<br> Javier<br><br><div><span class="gmail_quote">On 10/8/07, <b class="gmail_sendername">Bert Freudenberg</b>
<<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>On Oct 8, 2007, at 0:30 , Javier Reyes wrote:
<br><br>> Hello All,<br>><br>> I am trying to create a button or morph that when pressed stores<br>> the present Squeak image and exits Squeak. I have tried both with a<br>> PluggableButtonMorph with its action associated and with a plain
<br>> rectangleMorph defining its mouseDown method as follows:<br>><br>> mouseDown: anEvent<br>> SmalltalkImage current saveImageInFileNamed: (SmalltalkImage<br>> current imageName).<br>> Smalltalk quitPrimitive.
<br>><br>><br>> In both cases pressing the morph performs as expected, but when I<br>> try to launch that image back and the application with it, it seems<br>> to be looped into that event again exiting immediately.
<br>><br>> I know I am missing something important. Could someone explain me<br>> what it is ?<br><br>Sure. "Saving" an image means simply to stop time. So time stops<br>"inside" of #saveImageInFileNamed:, and when you resume the image,
<br>the first thing it executes is ... quitPrimitive. That's why we have<br>that method that does both: #snapshot:andQuit:.<br><br>- Bert -<br><br><br><br></blockquote></div><br>