diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-12-31 15:08:04 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-12-31 15:08:04 (GMT) |
commit | 65293680aa6a4f62024eb25ba8ff4c731c126a60 (patch) | |
tree | d3cbc35e75719cf530f794cf4a1088f461b4e671 | |
parent | 9cf00dd5510cb433d4bc3fd941127c6675f5558d (diff) | |
download | cpython-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.py | 9 |
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: |