testing for image restart
ned at bike-nomad.com
Sat Jan 4 00:41:02 UTC 2003
On Friday 03 January 2003 04:29 pm, Andreas Raab wrote:
> I don't think this is what Derek meant.
You're right. I missed the whole question.
> 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
I think it would be hard to tell whether *significant* changes had
happened since the last save. Though you could certainly watch for
unsaved source code changes or doits after a change. But what about
direct manipulation of Morphs?
> 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).
That would be easy enough to do at startup time if all you were
concerned about was source code changes.
> > -----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
GPG key ID: BEEA7EFE
More information about the Squeak-dev