I really like Announcements! It's so much easier to update complex GUIs when
you can pass state :)
I hit one glitch when unsubscribing... The CollaborActive book suggests
unsubscribing in #delete. For complex UIs, this doesn't seem to work
because #delete is only called for the one morph that was deleted, not for
its submorphs (which may need to unsubscribe).
I tried this:
MyMorph>>delete
super delete. "Must come first. Deleting a submorph before self =
emergency evaluator"
aSubmorphThatNeedsToUnsubscribe delete.
SubmorphMentionedAbove>>delete
self inventory announcer unsubscribe: self.
super delete.
But it seems like a lot of work and coupling. Is there no hook that is
guaranteed to be called when a morph is going away - i.e. it or a morph in
the owner chain is being deleted?
Thanks.
Sean
--
View this message in context:
http://forum.world.st/Unsubscribing-for-Announcements-tp3220751p3220751.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.