testing for image restart

Derek Brans brans at nerdonawire.com
Mon Jan 6 01:09:52 UTC 2003


Come to think of it, I'd like to know how to apply the changes too.
Thank you,
Derek

On Friday, January 3, 2003, at 04:29 PM, Andreas Raab wrote:

> I don't think this is what Derek meant. I would presume that he's rather
> interested in finding out if the image crashed the last time it was run.
> I've actually been interested myself in this but as of now there's no
> way to distinguish between a "quit" and a crash. It is also hard to
> figure out (for example) if you crashed after a "save".
>
> The reason why I wanted this was actually to have a trivial little
> watcher that should come up and tell newbies "by the way you crashed but
> here are changes you did" and throw them right into a change list - I've
> found that many newbies are very concerned about "loosing their stuff"
> since Squeak doesn't present that standard "file based feel" and there
> is nothing obvious that tells them that you can recover everything from
> the changes with the right tool (and what and where this tool is).
>
> Cheers,
>   - Andreas
>
>> -----Original Message-----
>> From: squeak-dev-admin at lists.squeakfoundation.org
>> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On
>> Behalf Of Ned Konz
>> Sent: Saturday, January 04, 2003 1:18 AM
>> To: squeak-dev at lists.squeakfoundation.org
>> Subject: Re: testing for image restart
>>
>>
>> On Friday 03 January 2003 04:12 pm, Derek Brans wrote:
>>> Is there a way for the image to know when it has been restarted
>>> (ie, the vm is killed and then restarted).
>>
>> Yes: all the classes registered with the startup list get notified by
>> calling their #startUp: or #startUp method. The parameter to startUp:
>> indicates whether the image is restarting after a snapshot.
>>
>> you do this:
>>
>> Smalltalk addToStartUpList: SomeClass.
>>
>> later the system calls:
>>
>> SomeClass startUp: true  (if resuming after snapshot)
>> or
>> SomeClass startUp: false (if starting fresh)
>>
>> --
>> Ned Konz
>> http://bike-nomad.com
>> GPG key ID: BEEA7EFE
>>
>>
>
>
>
>
Nerd on a Wire: Web and Information Solutions
Website Design - Database Systems - Site Hosting
604.874.6463
mailto:info at nerdonawire.com
For more information, visit http://nerdonawire.com




More information about the Squeak-dev mailing list