]> granicus.if.org Git - python/commitdiff
Replaced MacOS.EnableAppSwitch with MacOS.SchedParams
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 12 Jun 1997 10:51:18 +0000 (10:51 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 12 Jun 1997 10:51:18 +0000 (10:51 +0000)
Mac/Lib/EasyDialogs.py
Mac/Lib/FrameWork.py

index b42674a3fc5681f438809c0db0e74daa38039a50..742daa42329f9bd229ae9995f748108d6fc294cd 100644 (file)
@@ -213,7 +213,7 @@ def test():
                        "So far, so good!", "Keep on truckin'" )
        bar = ProgressBar("Progress, progress...", 100)
        try:
-               appsw = MacOS.EnableAppswitch(0)
+               appsw = MacOS.SchedParams(1, 0)
                for i in range(100):
                        bar.set(i)
                        time.sleep(0.1)
@@ -223,7 +223,7 @@ def test():
                time.sleep(0.3)         # give'em a chance to see the done.
        finally:
                del bar
-               MacOS.EnableAppswitch(appsw)
+               apply(MacOS.SchedParams, appsw)
 
 
        
index da07d139224f29ca7df36c7ec2ba5e434ba8aa87..caaf81cc37df05bf079b03d5d9e57f85960d3ccd 100644 (file)
@@ -143,7 +143,7 @@ class Application:
        
        def mainloop(self, mask = everyEvent, wait = 0):
                self.quitting = 0
-               saveyield = MacOS.EnableAppswitch(self.yield)
+               saveparams = apply(MacOS.SchedParams, self.schedparams)
                try:
                        while not self.quitting:
                                try:
@@ -154,9 +154,9 @@ class Application:
                                        # applications.
                                        break
                finally:
-                       MacOS.EnableAppswitch(saveyield)
+                       apply(MacOS.SchedParams, self.schedparams)
        
-       yield = -1
+       schedparams = MacOS.SchedParams()
        
        def do1event(self, mask = everyEvent, wait = 0):
                ok, event = self.getevent(mask, wait)