Nate Lowrie wrote:
> On Wed, Aug 27, 2008 at 2:19 PM, Paul McNett <[EMAIL PROTECTED]> wrote:
>>> Well, I tracked this bug down!!!  Now, the only question is how to fix
>>> it.  The cause for this bug is that the Form is catching the event and
>>> not propagating it to the menus.  In dPemMixin.py, on line 370 we bind
>>> the EVT_MENU_OPEN to the __wxMenuOpen function on line 512.  The open
>>> event is firing on the form, but it is never making it to the menu.  I
>>> have tried a couple of fixes but am getting nowhere.  Paul, Ed,
>>> suggestions?
>> Try this:
>> ===================================================================
>> --- dPemMixin.py        (revision 4468)
>> +++ dPemMixin.py        (working copy)
>> @@ -510,7 +510,7 @@
>>
>>
>>         def __onWxMenuOpen(self, evt):
>> -               self.raiseEvent(dEvents.MenuOpen, evt)
>> +               evt.Menu.raiseEvent(dEvents.MenuOpen, evt)
>>
>>
>>         def __onWxGotFocus(self, evt):
> 
> It works...I had to also do this though:
> 
> ===================================================================
> +++ C:\Documents and Settings\nwlowri\My
> Documents\Projects\Personal\dabo-full\trunk\dabo\ui\uiwx\dMenu.py     Wed
> Aug 27 14:25:05 2008
> @@ -44,6 +44,7 @@
>               uiApp = wx.GetApp()
>               uiApp.Bind(wx.EVT_MENU_OPEN, self.__onWxMenuOpen)
>               uiApp.Bind(wx.EVT_MENU_CLOSE, self.__onWxMenuClose)
> +             self.bindEvent(dEvents.MenuOpen, self._onMenuHighlight)
>               if self._useMRU:
>                       self.bindEvent(dEvents.MenuOpen, self._onMenuOpenMRU)
> 
> Does that affect Linux and Mac at all?  If not I will commit...

Why does the menu open event (occurs when the menu is opened) get bound 
to a menu highlight handler? What is the definition of menu hilighting?

Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to