Don't call MacOS.SchedParams() in MachO, it doesn't exist.

This commit is contained in:
Jack Jansen 2001-09-09 00:36:01 +00:00
parent a48d4eaddf
commit eb30843ea4

View file

@ -418,6 +418,7 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
d.SetDialogCancelItem(ARGV_ITEM_CANCEL)
d.GetDialogWindow().ShowWindow()
d.DrawDialog()
if hasattr(MacOS, 'SchedParams'):
appsw = MacOS.SchedParams(1, 0)
try:
while 1:
@ -522,6 +523,7 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
newlist.append(item)
return newlist
finally:
if hasattr(MacOS, 'SchedParams'):
apply(MacOS.SchedParams, appsw)
del d
@ -550,6 +552,7 @@ def test():
"So far, so good!", "Keep on truckin'" )
bar = ProgressBar("Progress, progress...", 0, label="Ramping up...")
try:
if hasattr(MacOS, 'SchedParams'):
appsw = MacOS.SchedParams(1, 0)
for i in xrange(20):
bar.inc()
@ -564,6 +567,7 @@ def test():
time.sleep(1.0) # give'em a chance to see "Done."
finally:
del bar
if hasattr(MacOS, 'SchedParams'):
apply(MacOS.SchedParams, appsw)
if __name__ == '__main__':