summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-12-31 15:08:04 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-12-31 15:08:04 (GMT)
commit65293680aa6a4f62024eb25ba8ff4c731c126a60 (patch)
treed3cbc35e75719cf530f794cf4a1088f461b4e671
parent9cf00dd5510cb433d4bc3fd941127c6675f5558d (diff)
downloadcpython-65293680aa6a4f62024eb25ba8ff4c731c126a60.zip
cpython-65293680aa6a4f62024eb25ba8ff4c731c126a60.tar.gz
cpython-65293680aa6a4f62024eb25ba8ff4c731c126a60.tar.bz2
Use the Carbon scrap manager interface if the old interface isn't available.
-rw-r--r--Mac/Tools/IDE/PyBrowser.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Mac/Tools/IDE/PyBrowser.py b/Mac/Tools/IDE/PyBrowser.py
index 74849df..b2468f3 100644
--- a/Mac/Tools/IDE/PyBrowser.py
+++ b/Mac/Tools/IDE/PyBrowser.py
@@ -291,8 +291,13 @@ class BrowserWidget(W.List):
text = string.join(selitems, '\r')
if text:
from Carbon import Scrap
- Scrap.ZeroScrap()
- Scrap.PutScrap('TEXT', text)
+ if hasattr(Scrap, 'PutScrap'):
+ Scrap.ZeroScrap()
+ Scrap.PutScrap('TEXT', text)
+ else:
+ Scrap.ClearCurrentScrap()
+ sc = Scrap.GetCurrentScrap()
+ sc.PutScrapFlavor('TEXT', 0, text)
class Browser: