Send message on pharo open/close?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Send message on pharo open/close?

StormByte
I need for my application to register its main class somehow, that pharo
will send a message (class side) to it whenever image is started/finished,
for example, to reconfigure database connections as they get invalid when
image closes and opens again.

Is there any hook for pharo to be able to send a message to my class on
image open and close?

Thanks.



Reply | Threaded
Open this post in threaded view
|

Re: Send message on pharo open/close?

Paul DeBruicker
use #startUp: and #shutDown: on the class side of your class.


check implementors of those methods for examples.


David Carlos Manuelda wrote
I need for my application to register its main class somehow, that pharo
will send a message (class side) to it whenever image is started/finished,
for example, to reconfigure database connections as they get invalid when
image closes and opens again.

Is there any hook for pharo to be able to send a message to my class on
image open and close?

Thanks.