Gary, If announcements are at all what I am expecting (perhaps a non-trivial assumption??), then I doubt it will be a problem. One would observe the world/window-manager for open events, and then express interest in events from individual windows. That might turn out to be easier on consumers than getting everything from one source. Cleanup should be trivial if the announcement framework uses weak references. Bill -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Gary Chambers Sent: Thursday, January 07, 2010 8:10 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Notifications of windows opening/closing/focus That is one option, though it does seem to be burdensome on the announcement consumers to (depending upon requirements) possibly have to track all windows themselves. Regards, Gary ----- Original Message ----- From: "Simon Denier" <Simon.Denier@inria.fr> To: <Pharo-project@lists.gforge.inria.fr> Sent: Thursday, January 07, 2010 12:47 PM Subject: Re: [Pharo-project] Notifications of windows opening/closing/focus
On 7 janv. 2010, at 12:49, Gary Chambers wrote:
I think the annnouncements should be sent by the World (being, effectively, the window manager).
One problem is that World is an instance of PasteUpMorph. If we modify this class, what happens to potential other instances? By default in my Pharo image, it seems that World is the only instance of PasteUpMorph.
Too many ways to open open a window exist and only the fact of being added to the World seems consistent. I suggest opened, closed, activated (becoming topmost-ish), deactivated, expanded, collapsed, restored and maybe repositioned/resized would be useful.
Do you mean that such announcements should be performed by World? Because most are already done by windows themselves with the patch of Alex. As I said, the only one really necessary in World is window opened, so that listeners subscribed to World are notifited of windows opened in World and can subscribe to them.
By the way Alex, is there a squeaksource project with your extensions as regular methods and classes (not in a changeset)?
Regards, Gary
----- Original Message ----- From: "Henrik Sperre Johansen" <henrik.s.johansen@veloxit.no> To: <Pharo-project@lists.gforge.inria.fr> Sent: Wednesday, January 06, 2010 9:53 PM Subject: Re: [Pharo-project] Notifications of windows opening/closing/focus
On 06.01.2010 22:36, Simon Denier wrote:
On 6 janv. 2010, at 18:42, Gary Chambers wrote:
Indeed. Would be nicer if there was a proper announcement protocol for such things though.
I see, updateTasks is called everytime a change in layout happens then. Indeed, it looks like announcements will greatly simplified the trick.
I am not sure where to do the announcement though. Does any top window uses openInWorld to add itself to World?
My guess would be that at the end of SystemWindow>> openAsIsIn: would be the the simplest place to put it.
Cheers, Henry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Simon
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project