[Pharo-project] Can I get a "image save" notification?
My program wants to detect image save event. I couldn't find one, so changed SmalltalkImage>>logChanged: or SmalltalkImage>>addSnapshot:andQuit: to detect the image save and fire my custom notification. Is there a good for doing this like SystemChangeNotification or SystemAnnouncement? HwaJong -- View this message in context: http://forum.world.st/Can-I-get-a-image-save-notification-tp4576118p4576118.... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Sat, Apr 21, 2012 at 10:47 AM, HwaJong Oh <daliot.oh@gmail.com> wrote:
My program wants to detect image save event. I couldn't find one, so changed SmalltalkImage>>logChanged: or SmalltalkImage>>addSnapshot:andQuit: to detect the image save and fire my custom notification.
That makes sense.
Is there a good for doing this like SystemChangeNotification or SystemAnnouncement?
The good solution I guess it would be SystemAnnouncement. Anyway, if you want a dirty solution without changing the system, you can have your custom class that adds itself to Smalltalk shutDownList and then it implements #shutDown: this will be called also when saving the image. See senders of #processShutDownList: Cheers HwaJong
-- View this message in context: http://forum.world.st/Can-I-get-a-image-save-notification-tp4576118p4576118.... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Mariano http://marianopeck.wordpress.com
Reporting shutDown: startUp: experiments. #Save shutDown: false <write files> startUp: false #Save as shutDown: false <write files> startUp: false #Save and Quit shutDown: true <write files> startUp: true #Quit shutDown: true -- View this message in context: http://forum.world.st/Can-I-get-a-image-save-notification-tp4576118p4577461.... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (2)
-
HwaJong Oh -
Mariano Martinez Peck