Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94416e5

Browse files
committed
Got rid of a couple of OS9-isms.
1 parent 2eb4b18 commit 94416e5

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Mac/Lib/MiniAEFrame.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ def lowlevelhandler(self, event):
8282
if c == '.':
8383
raise KeyboardInterrupt, "Command-period"
8484
if c == 'q':
85-
MacOS.OutputSeen()
85+
if hasattr(MacOS, 'OutputSeen'):
86+
MacOS.OutputSeen()
8687
self.quitting = 1
8788
return
8889
elif what == mouseDown:
@@ -98,12 +99,16 @@ def lowlevelhandler(self, event):
9899
name = self.applemenu.GetMenuItemText(item)
99100
Menu.OpenDeskAcc(name)
100101
elif id == self.quitid and item == 1:
101-
MacOS.OutputSeen()
102+
if hasattr(MacOS, 'OutputSeen'):
103+
MacOS.OutputSeen()
102104
self.quitting = 1
103105
Menu.HiliteMenu(0)
104106
return
105107
# Anything not handled is passed to Python/SIOUX
106-
MacOS.HandleEvent(event)
108+
if hasattr(MacOS, 'HandleEvent'):
109+
MacOS.HandleEvent(event)
110+
else:
111+
print "Unhandled event:", event
107112

108113
def getabouttext(self):
109114
return self.__class__.__name__

0 commit comments

Comments
 (0)