Simple newbie question
Ned Konz
ned at bike-nomad.com
Thu Nov 14 23:44:07 UTC 2002
On Thursday 14 November 2002 03:05 pm, tblanchard at mac.com wrote:
> Supposing I have an object that holds some external resource - like
> a socket connection to a server. When the vm is quit I want to
> execute a little bit of code to sign off to the server. When the
> vm is started up again, I want to re-establish my connection.
>
> What are the startup/shutdown hooks I can use to make this happen?
startup:
add MyClass>>startUp
or MyClass>>startUp: resuming
from MyClass>>initialize, do:
Smalltalk addToStartUpList: self
or
Smalltalk addToStartUpList: self after: SomeOtherClass
shutdown:
add MyClass>>shutDown
or MyClass>>shutDown: aboutToQuit
from MyClass>>initialize, do:
Smalltalk addToShutDownList: self
or
Smalltalk addToShutDownList: self after: SomeOtherClass
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|