Update of /cvsroot/pythoncard/PythonCard
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9199
Modified Files:
menu.py model.py widget.py
Log Message:
added WXMAC workaround for menu _dispatch
fixed function._name references to be __name__
Index: widget.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/widget.py,v
retrieving revision 1.126
retrieving revision 1.127
diff -C2 -d -r1.126 -r1.127
*** widget.py 5 May 2004 03:51:53 -0000 1.126
--- widget.py 5 May 2004 20:27:09 -0000 1.127
***************
*** 320,324 ****
if handler:
if 0:
! print " binding", self.name, eventClass.name, handler._name, eventClass.id
# KEA 2004-05-02
# change to just using the method directly, Handler class not needed
--- 320,324 ----
if handler:
if 0:
! print " binding", self.name, eventClass.name, handler.__name__, eventClass.id
# KEA 2004-05-02
# change to just using the method directly, Handler class not needed
Index: model.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/model.py,v
retrieving revision 1.164
retrieving revision 1.165
diff -C2 -d -r1.164 -r1.165
*** model.py 5 May 2004 03:51:53 -0000 1.164
--- model.py 5 May 2004 20:27:07 -0000 1.165
***************
*** 679,683 ****
if handler:
if 0:
! print "binding", eventClass.name, handler._name, wxRegistry[eventClass][1]
self.eventIdToHandler[wxRegistry[eventClass][1]] = handler
# deactivate is a special case
--- 679,683 ----
if handler:
if 0:
! print "binding", eventClass.name, handler.__name__, wxRegistry[eventClass][1]
self.eventIdToHandler[wxRegistry[eventClass][1]] = handler
# deactivate is a special case
***************
*** 762,766 ****
event.EventLog.getInstance().log(eventName, self.name, True)
if 0:
! print "dispatching", handler._name
# make a lowercase alias
aWxEvent.skip = aWxEvent.Skip
--- 762,766 ----
event.EventLog.getInstance().log(eventName, self.name, True)
if 0:
! print "dispatching", handler.__name__
# make a lowercase alias
aWxEvent.skip = aWxEvent.Skip
Index: menu.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/menu.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** menu.py 5 May 2004 03:51:53 -0000 1.33
--- menu.py 5 May 2004 20:27:07 -0000 1.34
***************
*** 133,137 ****
if handler:
if 0:
! print " binding", self.name, eventClass.name, handler._name, eventClass.id
#self.eventIdToHandler[eventClass.id] = handler.getFunction()
self.eventIdToHandler[eventClass.id] = handler
--- 133,137 ----
if handler:
if 0:
! print " binding", self.name, eventClass.name, handler.__name__, eventClass.id
#self.eventIdToHandler[eventClass.id] = handler.getFunction()
self.eventIdToHandler[eventClass.id] = handler
***************
*** 187,191 ****
# the menu events are always bound to the parent frame
# so the target of the event will be the "background"
! background = aWxEvent.GetEventObject()
## background = wx.GetTopLevelParent(self)
--- 187,198 ----
# the menu events are always bound to the parent frame
# so the target of the event will be the "background"
! # KEA 2004-05-05
! # it looks like WXMAC might be broken since GetEventObject
! # is returning the menu item, not the frame the event was
! # bound to
! if wx.Platform == '__WXMAC__':
! background = aWxEvent.GetEventObject().parent.parent
! else:
! background = aWxEvent.GetEventObject()
## background = wx.GetTopLevelParent(self)
|