Login  Register

Send message on pharo open/close?

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

Send message on pharo open/close?

StormByte
48 posts
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
| More
Print post
Permalink

Re: Send message on pharo open/close?

Paul DeBruicker
1579 posts
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.