From: Jack Jansen Date: Thu, 21 Mar 2002 22:36:57 +0000 (+0000) Subject: For reasons I don't fully understand we sometimes get unexpected events X-Git-Tag: v2.3c1~6419 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9e66612069f0f1ce9f38c4abb7f273289efd203;p=thirdparty%2FPython%2Fcpython.git 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). --- diff --git a/Mac/Tools/IDE/Wapplication.py b/Mac/Tools/IDE/Wapplication.py index fdcd9fbcc8b5..ec0071f22bb7 100644 --- a/Mac/Tools/IDE/Wapplication.py +++ b/Mac/Tools/IDE/Wapplication.py @@ -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 diff --git a/Mac/Tools/IDE/Wwindows.py b/Mac/Tools/IDE/Wwindows.py index 653499bf3a9d..ffab76c5806e 100644 --- a/Mac/Tools/IDE/Wwindows.py +++ b/Mac/Tools/IDE/Wwindows.py @@ -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: