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

Skip to content

Commit 7fb76e0

Browse files
committed
Replaced MacOS.EnableAppswitch by MacOS.SchedParams
1 parent caa7c46 commit 7fb76e0

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Mac/Lib/test/AEservertest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ def myaskstring(str, default=''):
4242

4343
def main():
4444
echo = EchoServer()
45-
yield = MacOS.EnableAppswitch(-1) # Disable Python's own "event handling"
45+
savepars = MacOS.SchedParams(0, 0) # Disable Python's own "event handling"
4646
try:
4747
try:
4848
echo.mainloop(everyEvent, 0)
4949
except Quit:
5050
pass
5151
finally:
52-
MacOS.EnableAppswitch(yield) # Let Python have a go at events
52+
apply(MacOS.SchedParams, savepars) # Let Python have a go at events
5353
echo.close()
5454

5555

Mac/Lib/test/ctbtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def main():
1616
print 'Communications Toolbox not available'
1717
sys.exit(1)
1818
# Disable Python's event processing (we do that)
19-
MacOS.EnableAppswitch(0)
19+
MacOS.SchedParams(1, 0)
2020
print 'Minimal terminal emulator V1.0'
2121
print '(type command-Q to exit)'
2222
print

Mac/Lib/test/echo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ def mymessage(str):
3333

3434
def main():
3535
echo = EchoServer()
36-
yield = MacOS.EnableAppswitch(-1) # Disable Python's own "event handling"
36+
saveparams = MacOS.SchedParams(0, 0) # Disable Python's own "event handling"
3737
try:
3838
echo.mainloop(everyEvent, 0)
3939
finally:
40-
MacOS.EnableAppswitch(yield) # Let Python have a go at events
40+
apply(MacOS.SchedParams, saveparams) # Let Python have a go at events
4141
echo.close()
4242

4343

Mac/Lib/test/tae.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import sys
1212
import MacOS
1313

14-
MacOS.EnableAppswitch(0)
14+
MacOS.SchedParams(1, 0)
1515

1616
def aehandler(request, reply):
1717
tosend = []

0 commit comments

Comments
 (0)