Exit loop

Javier Reyes jreyes at virtual-fashion.com
Tue Oct 9 21:35:54 UTC 2007


Hi Bert,

Thanks for the explanation. Now its cristal clear to me.

All the best,
                     Javier

On 10/8/07, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
>
> On Oct 8, 2007, at 0:30 , Javier Reyes wrote:
>
> > Hello All,
> >
> > I am trying to create a button or morph that when pressed stores
> > the present Squeak image and exits Squeak. I have tried both with a
> > PluggableButtonMorph with its action associated and with a plain
> > rectangleMorph defining its mouseDown method as follows:
> >
> > mouseDown: anEvent
> > SmalltalkImage current saveImageInFileNamed: (SmalltalkImage
> > current imageName).
> > Smalltalk quitPrimitive.
> >
> >
> > In both cases pressing the morph performs as expected, but when I
> > try to launch that image back and the application with it, it seems
> > to be looped into that event again exiting immediately.
> >
> > I know I am missing something important.  Could someone explain me
> > what it is ?
>
> Sure.  "Saving" an image means simply to stop time. So time stops
> "inside" of #saveImageInFileNamed:, and when you resume the image,
> the first thing it executes is ... quitPrimitive. That's why we have
> that method that does both: #snapshot:andQuit:.
>
> - Bert -
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20071009/cba5a9ad/attachment.htm


More information about the Squeak-dev mailing list