[Newbies] saving image automatically

Norbert Hartl norbert at hartl.name
Thu Apr 26 22:40:50 UTC 2007

On Fri, 2007-04-27 at 00:40 +0400, George Herolyants wrote:
> Hi Norbert,
> I hope the following code will make clear this "strange" behaviour.
> | i delay |
> i := 0.
> delay := Delay forMilliseconds: 1000.
> Transcript clear.
> 10 timesRepeat: [Transcript cr; show: (i := i + 1). delay wait].
> SmalltalkImage current snapshot: true andQuit: true.
> 10 timesRepeat: [Transcript cr; show: (i := i + 1). delay wait].
> you see this "strange" behaviour because all threads are suspending when
> you are closing your image and resuming when you're opening it again.
> When you're opening your "deploy" image the last line of code in
> MySetup>>deploy method is executing and image is closing again.
> I hope it'll help you.
Yes, I saw the snapshot call in saveImageInFileNamed but forgot about
it :) so it is very clear what is happening.

But I'm wondering if my approach is the right one. I like to switch
the image to a new name, tweak some things and save it without the
original image being changed. Is there a better way to it?



More information about the Beginners mailing list