For reasons I don't fully understand we sometimes get unexpected events

in MachoPython. As we don't have MacOS.HandleEvent() we drop these on
the floor (with a print).
This commit is contained in:
Jack Jansen 2002-03-21 22:36:57 +00:00
parent 0e5a733887
commit b9e6661206
2 changed files with 8 additions and 2 deletions

View File

@ -202,7 +202,10 @@ class Application(FrameWork.Application):
import sys
sys.stderr.write("XXX killed unknown (crashed?) Python window.\n")
else:
MacOS.HandleEvent(event)
if hasattr(MacOS, 'HandleEvent'):
MacOS.HandleEvent(event)
else:
print 'Unexpected updateEvent:', event
def suspendresume(self, onoff):
pass

View File

@ -519,7 +519,10 @@ class ModalDialog(Dialog):
name = "do_%d" % partcode
if name == "do_inDesk":
MacOS.HandleEvent(event)
if hasattr(MacOS, "HandleEvent"):
MacOS.HandleEvent(event)
else:
print 'Unexpected inDesk event:', event
return
if wid == self.wid:
try: