Programmatically save image, and also do it periodically

Keith Hodges keith_hodges at yahoo.co.uk
Tue Jan 8 19:52:53 UTC 2008


itsme213 wrote:
> I need to urgently do both these saves:
>   - do these on command (via Seaside app interface)
>   - automatically on a timer
>
> I've browsed a bit and found
>     SmalltalkImage current snapshot:andQuit:
>
> But this seems to require a confirmation. How do I bypass that?
>
> I found STimer for timed block execution, but found no way to stop an 
> STimer.
>
> Help appreciated,
>
> Sophie 
>   
Hi, two suggestions...

1)

Pier has periodic image saving code which you could adapt in the class
PRImagePersistency.
OSProcess is able to fork the image and save it, so as not to interupt
the running image.

2)

Installer mantis fixBug: '5851 Refactor SmalltalkImage saveAs'.

This provides a minor refactoring to provide a confirmation free variant
 SmalltalkImage-#saveAs: <imageName>

This fix is part of the 'LevelPlayingField' image generation script, and
is needed by Launcher.

best regards

Keith



More information about the Squeak-dev mailing list