Hi Mariano,

As you may remember, I have removed HostSystemMenus from PharoCore 1.0 some 
time ago.

What I did in this case was "Smalltalk at: #HostSystemMenus ifPresent:...", 
which is not very nice but easily solves the problem.

Thanks for removing it in 1.1. Until the duplication of events due to this 
package/plugin is solved, we should not have it in PharoCore. Or maybe even 
better we should not have it in PharoCore at all and load it only in Pharo 
(when it works).

Cheers,
Adrian


On Mar 18, 2010, at 23:38 , Mariano Martinez Peck wrote:

> Hi folks. I want to remove HostMenuSystem from PharoCore image. Probably, I
> can put it on PharoDev image but of course, it will be accesible also from
> squeaksource to download it. I don't this is a "core" package. In order to
> do that, I found the following problem.
> 
> Look to InputEventSensor >> processMenuEvent: evt
> 
>    | handler localCopyOfEvt |
> 
>    localCopyOfEvt := evt shallowCopy.
>    handler := (HostSystemMenus
>        defaultMenuBarForWindowIndex: (localCopyOfEvt at: 8))
>        getHandlerForMenu: (localCopyOfEvt at: 3) item: (localCopyOfEvt at:
> 4).
> 
>    handler handler value: localCopyOfEvt
> 
> There is the only place where HostSystemMenus is used. Now I am trying to
> see the best way to remove this. The first approach that came to my mind,
> which may not be the best to implement this method as follows:
> 
> processMenuEvent: evt
>    "By default the menu events are not handled. In case you want to handle
> them you should override this method"
> 
> And of course, in the package HostSystemMenus  we override that method with
> the original code.
> 
> Then I though some kind of notification or oberser pattern, where someone
> can register as an "observer" and then, then this menu events occurs, these
> guys are notified. Maybe using Announcments?  My skills here are quite
> limited. What do you think ? Can you help me ?
> 
> Cheers
> 
> Mariano
> _______________________________________________
> 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

Reply via email to