Commit 0b60150f authored by Jack Jansen's avatar Jack Jansen

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).
parent a26d92fd
...@@ -202,7 +202,10 @@ class Application(FrameWork.Application): ...@@ -202,7 +202,10 @@ class Application(FrameWork.Application):
import sys import sys
sys.stderr.write("XXX killed unknown (crashed?) Python window.\n") sys.stderr.write("XXX killed unknown (crashed?) Python window.\n")
else: else:
MacOS.HandleEvent(event) if hasattr(MacOS, 'HandleEvent'):
MacOS.HandleEvent(event)
else:
print 'Unexpected updateEvent:', event
def suspendresume(self, onoff): def suspendresume(self, onoff):
pass pass
......
...@@ -519,7 +519,10 @@ class ModalDialog(Dialog): ...@@ -519,7 +519,10 @@ class ModalDialog(Dialog):
name = "do_%d" % partcode name = "do_%d" % partcode
if name == "do_inDesk": if name == "do_inDesk":
MacOS.HandleEvent(event) if hasattr(MacOS, "HandleEvent"):
MacOS.HandleEvent(event)
else:
print 'Unexpected inDesk event:', event
return return
if wid == self.wid: if wid == self.wid:
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment