dabo Commit
Revision 4843
Date: 2008-12-15 22:09:33 -0800 (Mon, 15 Dec 2008)
Author: Paul
Trac: http://trac.dabodev.com/dabo/changeset/4843
Changed:
U trunk/dabo/ui/uiwx/dMenuBar.py
U trunk/dabo/ui/uiwx/dPemMixin.py
Log:
Fixed AttributeError on Mac when right-clicking on a textbox. Thanks to
Henning Hraban Ramm for posting about it.
Diff:
Modified: trunk/dabo/ui/uiwx/dMenuBar.py
===================================================================
--- trunk/dabo/ui/uiwx/dMenuBar.py 2008-12-16 05:30:41 UTC (rev 4842)
+++ trunk/dabo/ui/uiwx/dMenuBar.py 2008-12-16 06:09:33 UTC (rev 4843)
@@ -35,7 +35,7 @@
## to be identical to EVT_MENU_HIGHLIGHT. Therefore, as of
this writing
## we are exposing two menu events: dEvents.Hit and
dEvents.Highlight.
menu = evt.GetMenu()
- if menu:
+ if menu and isinstance(menu, dMenu.dMenu):
menu.raiseEvent(dEvents.MenuHighlight)
evt.Skip()
Modified: trunk/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPemMixin.py 2008-12-16 05:30:41 UTC (rev 4842)
+++ trunk/dabo/ui/uiwx/dPemMixin.py 2008-12-16 06:09:33 UTC (rev 4843)
@@ -518,8 +518,10 @@
def __onWxMenuOpen(self, evt):
- if evt.Menu:
- evt.Menu.raiseEvent(dEvents.MenuOpen, evt)
+ menu = evt.GetMenu()
+ if menu and isinstance(menu, dabo.ui.dMenu):
+ menu.raiseEvent(dEvents.MenuOpen, evt)
+ evt.Skip()
def __onWxGotFocus(self, evt):
_______________________________________________
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]