Notifications of windows opening/closing/focus

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

Notifications of windows opening/closing/focus

Simon Denier-3
Hi

How do you get notified of windows opening, closing, or getting focus in Pharo? Is there some announcements or some older events?


--
 Simon




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Gary Chambers-4
Nothing like that currently or previously AFAIK.

Regards, Gary

----- Original Message -----
From: "Simon Denier" <[hidden email]>
To: "Pharo Development" <[hidden email]>
Sent: Monday, January 04, 2010 4:00 PM
Subject: [Pharo-project] Notifications of windows opening/closing/focus


> Hi
>
> How do you get notified of windows opening, closing, or getting focus in
> Pharo? Is there some announcements or some older events?
>
>
> --
> Simon
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Alexandre Bergel
In reply to this post by Simon Denier-3
> How do you get notified of windows opening, closing, or getting  
> focus in Pharo? Is there some announcements or some older events?

Hi Simon,

I did something like this for Mondrian. It is based on announcement.
For multiple reasons, I haven't got the time to push it into the  
mainstream.
Load Mondrian, and you will find the class:
MOMorphicExtensionInstaller

When this class is loaded, it installs a changeset defined in a class-
side method.
Have a look at the class MorphicWindowNotificationTest to see how to  
use it.

I have been using this extension for some time, it is pretty harmless.

Maybe I can put it in a dedicated Monticello repository...

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Alexandre Bergel
In reply to this post by Gary Chambers-4
Gary,

In this email I attached a .st file. Just load it, and it will install  
the change set to get notifications.
A number of people already expressed their need for such an extension.

Cheers,
Alexandre



On 4 Jan 2010, at 17:20, Gary Chambers wrote:

> Nothing like that currently or previously AFAIK.
>
> Regards, Gary
>
> ----- Original Message -----
> From: "Simon Denier" <[hidden email]>
> To: "Pharo Development" <[hidden email]>
> Sent: Monday, January 04, 2010 4:00 PM
> Subject: [Pharo-project] Notifications of windows opening/closing/
> focus
>
>
>> Hi
>>
>> How do you get notified of windows opening, closing, or getting  
>> focus in
>> Pharo? Is there some announcements or some older events?
>>
>>
>> --
>> Simon
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

MOMorphicExtensionInstaller.st (25K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Stéphane Ducasse
Yes it would be good to see if this is ok to get it into the system.

Stef

On Jan 4, 2010, at 5:39 PM, Alexandre Bergel wrote:

> Gary,
>
> In this email I attached a .st file. Just load it, and it will install the change set to get notifications.
> A number of people already expressed their need for such an extension.
>
> Cheers,
> Alexandre
>
> <MOMorphicExtensionInstaller.st>
> On 4 Jan 2010, at 17:20, Gary Chambers wrote:
>
>> Nothing like that currently or previously AFAIK.
>>
>> Regards, Gary
>>
>> ----- Original Message -----
>> From: "Simon Denier" <[hidden email]>
>> To: "Pharo Development" <[hidden email]>
>> Sent: Monday, January 04, 2010 4:00 PM
>> Subject: [Pharo-project] Notifications of windows opening/closing/focus
>>
>>
>>> Hi
>>>
>>> How do you get notified of windows opening, closing, or getting focus in
>>> Pharo? Is there some announcements or some older events?
>>>
>>>
>>> --
>>> Simon
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Tudor Girba
Indeed, that would be great.

Doru


On 4 Jan 2010, at 22:48, Stéphane Ducasse wrote:

> Yes it would be good to see if this is ok to get it into the system.
>
> Stef
>
> On Jan 4, 2010, at 5:39 PM, Alexandre Bergel wrote:
>
>> Gary,
>>
>> In this email I attached a .st file. Just load it, and it will  
>> install the change set to get notifications.
>> A number of people already expressed their need for such an  
>> extension.
>>
>> Cheers,
>> Alexandre
>>
>> <MOMorphicExtensionInstaller.st>
>> On 4 Jan 2010, at 17:20, Gary Chambers wrote:
>>
>>> Nothing like that currently or previously AFAIK.
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message -----
>>> From: "Simon Denier" <[hidden email]>
>>> To: "Pharo Development" <[hidden email]>
>>> Sent: Monday, January 04, 2010 4:00 PM
>>> Subject: [Pharo-project] Notifications of windows opening/closing/
>>> focus
>>>
>>>
>>>> Hi
>>>>
>>>> How do you get notified of windows opening, closing, or getting  
>>>> focus in
>>>> Pharo? Is there some announcements or some older events?
>>>>
>>>>
>>>> --
>>>> Simon
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"When people care, great things can happen."




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Simon Denier-3
In reply to this post by Alexandre Bergel

On 4 janv. 2010, at 17:39, Alexandre Bergel wrote:

> Gary,
>
> In this email I attached a .st file. Just load it, and it will install the change set to get notifications.

I see. The fact that the actual changes are in a method makes it a bit hard to browse (I like to browse things before installing them)

Only problem is how to subscribe to a new window announcer when it pops up by any means (world menu, button, do-it....)? Should I scan World submorphs periodically? It does not seem right.
Perhaps an announcement is missing in World, to notify a new window (then one can subscribe to the window)



> A number of people already expressed their need for such an extension.
>
> Cheers,
> Alexandre
>
> <MOMorphicExtensionInstaller.st>
> On 4 Jan 2010, at 17:20, Gary Chambers wrote:
>
>> Nothing like that currently or previously AFAIK.
>>
>> Regards, Gary
>>
>> ----- Original Message -----
>> From: "Simon Denier" <[hidden email]>
>> To: "Pharo Development" <[hidden email]>
>> Sent: Monday, January 04, 2010 4:00 PM
>> Subject: [Pharo-project] Notifications of windows opening/closing/focus
>>
>>
>>> Hi
>>>
>>> How do you get notified of windows opening, closing, or getting focus in
>>> Pharo? Is there some announcements or some older events?
>>>
>>>
>>> --
>>> Simon
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
 Simon




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Alexandre Bergel
>> In this email I attached a .st file. Just load it, and it will  
>> install the change set to get notifications.
>
> I see. The fact that the actual changes are in a method makes it a  
> bit hard to browse (I like to browse things before installing them)
>
> Only problem is how to subscribe to a new window announcer when it  
> pops up by any means (world menu, button, do-it....)? Should I scan  
> World submorphs periodically? It does not seem right.
> Perhaps an announcement is missing in World, to notify a new window  
> (then one can subscribe to the window)

This is not supported currently. I haven't see a situation where I  
personally need it.
I can easily add this... Do you want me to do it?

Alexandre

>
>
>
>> A number of people already expressed their need for such an  
>> extension.
>>
>> Cheers,
>> Alexandre
>>
>> <MOMorphicExtensionInstaller.st>
>> On 4 Jan 2010, at 17:20, Gary Chambers wrote:
>>
>>> Nothing like that currently or previously AFAIK.
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message -----
>>> From: "Simon Denier" <[hidden email]>
>>> To: "Pharo Development" <[hidden email]>
>>> Sent: Monday, January 04, 2010 4:00 PM
>>> Subject: [Pharo-project] Notifications of windows opening/closing/
>>> focus
>>>
>>>
>>>> Hi
>>>>
>>>> How do you get notified of windows opening, closing, or getting  
>>>> focus in
>>>> Pharo? Is there some announcements or some older events?
>>>>
>>>>
>>>> --
>>>> Simon
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> Simon
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Gary Chambers-4
Would be nice (if anyone needs it) to have a "global" access point (the
World perhaps) for general notifcations as hinted at earlier. Kind of
"window manager" notifications.

In the individual window case, I see some use in being to pick up
"reactivation" perhaps, to refresh contents etc. when costly to keep
constantly in sync...

Regards, Gary

----- Original Message -----
From: "Alexandre Bergel" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, January 06, 2010 3:17 PM
Subject: Re: [Pharo-project] Notifications of windows opening/closing/focus


>>> In this email I attached a .st file. Just load it, and it will
>>> install the change set to get notifications.
>>
>> I see. The fact that the actual changes are in a method makes it a
>> bit hard to browse (I like to browse things before installing them)
>>
>> Only problem is how to subscribe to a new window announcer when it
>> pops up by any means (world menu, button, do-it....)? Should I scan
>> World submorphs periodically? It does not seem right.
>> Perhaps an announcement is missing in World, to notify a new window
>> (then one can subscribe to the window)
>
> This is not supported currently. I haven't see a situation where I
> personally need it.
> I can easily add this... Do you want me to do it?
>
> Alexandre
>
>>
>>
>>
>>> A number of people already expressed their need for such an
>>> extension.
>>>
>>> Cheers,
>>> Alexandre
>>>
>>> <MOMorphicExtensionInstaller.st>
>>> On 4 Jan 2010, at 17:20, Gary Chambers wrote:
>>>
>>>> Nothing like that currently or previously AFAIK.
>>>>
>>>> Regards, Gary
>>>>
>>>> ----- Original Message -----
>>>> From: "Simon Denier" <[hidden email]>
>>>> To: "Pharo Development" <[hidden email]>
>>>> Sent: Monday, January 04, 2010 4:00 PM
>>>> Subject: [Pharo-project] Notifications of windows opening/closing/
>>>> focus
>>>>
>>>>
>>>>> Hi
>>>>>
>>>>> How do you get notified of windows opening, closing, or getting
>>>>> focus in
>>>>> Pharo? Is there some announcements or some older events?
>>>>>
>>>>>
>>>>> --
>>>>> Simon
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> [hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> --
>> Simon
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Simon Denier-3

On 6 janv. 2010, at 16:48, Gary Chambers wrote:

> Would be nice (if anyone needs it) to have a "global" access point (the
> World perhaps) for general notifcations as hinted at earlier. Kind of
> "window manager" notifications.

I think so. It would be useful in the long terms for window management.

However, the current taskbar is able to detect and register any new window. Gary, can you tell how it is done right now?


>
> In the individual window case, I see some use in being to pick up
> "reactivation" perhaps, to refresh contents etc. when costly to keep
> constantly in sync...
>
> Regards, Gary
>
> ----- Original Message -----
> From: "Alexandre Bergel" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, January 06, 2010 3:17 PM
> Subject: Re: [Pharo-project] Notifications of windows opening/closing/focus
>
>
>>>> In this email I attached a .st file. Just load it, and it will
>>>> install the change set to get notifications.
>>>
>>> I see. The fact that the actual changes are in a method makes it a
>>> bit hard to browse (I like to browse things before installing them)
>>>
>>> Only problem is how to subscribe to a new window announcer when it
>>> pops up by any means (world menu, button, do-it....)? Should I scan
>>> World submorphs periodically? It does not seem right.
>>> Perhaps an announcement is missing in World, to notify a new window
>>> (then one can subscribe to the window)
>>
>> This is not supported currently. I haven't see a situation where I
>> personally need it.
>> I can easily add this... Do you want me to do it?
>>
>> Alexandre
>>
>>>
>>>
>>>
>>>> A number of people already expressed their need for such an
>>>> extension.
>>>>
>>>> Cheers,
>>>> Alexandre
>>>>
>>>> <MOMorphicExtensionInstaller.st>
>>>> On 4 Jan 2010, at 17:20, Gary Chambers wrote:
>>>>
>>>>> Nothing like that currently or previously AFAIK.
>>>>>
>>>>> Regards, Gary
>>>>>
>>>>> ----- Original Message -----
>>>>> From: "Simon Denier" <[hidden email]>
>>>>> To: "Pharo Development" <[hidden email]>
>>>>> Sent: Monday, January 04, 2010 4:00 PM
>>>>> Subject: [Pharo-project] Notifications of windows opening/closing/
>>>>> focus
>>>>>
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> How do you get notified of windows opening, closing, or getting
>>>>>> focus in
>>>>>> Pharo? Is there some announcements or some older events?
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Simon
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> [hidden email]
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> [hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>> --
>>> Simon
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
 Simon




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Henrik Sperre Johansen
On 06.01.2010 17:14, Simon Denier wrote:

> On 6 janv. 2010, at 16:48, Gary Chambers wrote:
>
>    
>> Would be nice (if anyone needs it) to have a "global" access point (the
>> World perhaps) for general notifcations as hinted at earlier. Kind of
>> "window manager" notifications.
>>      
> I think so. It would be useful in the long terms for window management.
>
> However, the current taskbar is able to detect and register any new window. Gary, can you tell how it is done right now?
>
>    
TaskBarMorph >> ownerChanged, which is sent every time the World does
layout.

Cheers,
Henry

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Gary Chambers-4
Indeed. Would be nicer if there was a proper announcement protocol for such
things though.

Regards, Gary

----- Original Message -----
From: "Henrik Sperre Johansen" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, January 06, 2010 4:55 PM
Subject: Re: [Pharo-project] Notifications of windows opening/closing/focus


> On 06.01.2010 17:14, Simon Denier wrote:
>> On 6 janv. 2010, at 16:48, Gary Chambers wrote:
>>
>>
>>> Would be nice (if anyone needs it) to have a "global" access point (the
>>> World perhaps) for general notifcations as hinted at earlier. Kind of
>>> "window manager" notifications.
>>>
>> I think so. It would be useful in the long terms for window management.
>>
>> However, the current taskbar is able to detect and register any new
>> window. Gary, can you tell how it is done right now?
>>
>>
> TaskBarMorph >> ownerChanged, which is sent every time the World does
> layout.
>
> Cheers,
> Henry
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Simon Denier-3

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?

>
> Regards, Gary
>
> ----- Original Message -----
> From: "Henrik Sperre Johansen" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, January 06, 2010 4:55 PM
> Subject: Re: [Pharo-project] Notifications of windows opening/closing/focus
>
>
>> On 06.01.2010 17:14, Simon Denier wrote:
>>> On 6 janv. 2010, at 16:48, Gary Chambers wrote:
>>>
>>>
>>>> Would be nice (if anyone needs it) to have a "global" access point (the
>>>> World perhaps) for general notifcations as hinted at earlier. Kind of
>>>> "window manager" notifications.
>>>>
>>> I think so. It would be useful in the long terms for window management.
>>>
>>> However, the current taskbar is able to detect and register any new
>>> window. Gary, can you tell how it is done right now?
>>>
>>>
>> TaskBarMorph >> ownerChanged, which is sent every time the World does
>> layout.
>>
>> Cheers,
>> Henry
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
 Simon




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Henrik Sperre Johansen
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Schwab,Wilhelm K
I am not sure where to put it, but +10 for getting it done.  This is #57 or so on my list of things that Dolphin does that you can't miss if you've never had them available.  This combined with a way to connect to menus as they open allows the construction of easy to install IDE extensions.

Bill



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Henrik Sperre Johansen
Sent: Wednesday, January 06, 2010 4:54 PM
To: [hidden email]
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Gary Chambers-4
In reply to this post by Henrik Sperre Johansen
I think the annnouncements should be sent by the World (being, effectively,
the window manager).
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.

Regards, Gary

----- Original Message -----
From: "Henrik Sperre Johansen" <[hidden email]>
To: <[hidden email]>
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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Schwab,Wilhelm K
Gary,

It would also be nice to know about menus that open, but that is probably a matter to be taken up with the individual tool shell as it is opened.  Either way, this sounds like a great start.  Thanks to all involved for working on this!

Bill




-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Gary Chambers
Sent: Thursday, January 07, 2010 6:50 AM
To: [hidden email]
Subject: Re: [Pharo-project] Notifications of windows opening/closing/focus

I think the annnouncements should be sent by the World (being, effectively, the window manager).
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.

Regards, Gary

----- Original Message -----
From: "Henrik Sperre Johansen" <[hidden email]>
To: <[hidden email]>
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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Simon Denier-3
In reply to this post by Gary Chambers-4

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" <[hidden email]>
> To: <[hidden email]>
> 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
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
 Simon




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Henrik Sperre Johansen
In reply to this post by Gary Chambers-4
On Jan 7, 2010, at 12:49 57PM, Gary Chambers wrote:

> I think the annnouncements should be sent by the World (being, effectively,
> the window manager).
> 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.
>
> Regards, Gary
I thought the same, thus my first thought was doing it in PasteupMorph>> addMorph:.

Now I think it's a bad idea, because:
- Not all PasteUpMorphs are necessarily Worlds.
- Not all morphs added to Worlds are windows.

If putting it in a SystemWindow method means having to refactor some methods so all ways of opening a window passes through that method, I don't really see that as a bad thing.
As far as I can tell though, all open... methods for SystemWindow + subclasses already pass through #openAsIsIn:

Cheers,
Henry
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Notifications of windows opening/closing/focus

Gary Chambers-4
In reply to this post by Simon Denier-3
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" <[hidden email]>
To: <[hidden email]>
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" <[hidden email]>
>> To: <[hidden email]>
>> 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
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> Simon
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
123