Use the Carbon scrap manager interface if the old interface isn't available.
diff --git a/Mac/Tools/IDE/Wwindows.py b/Mac/Tools/IDE/Wwindows.py
index 1494187..20ed312 100644
--- a/Mac/Tools/IDE/Wwindows.py
+++ b/Mac/Tools/IDE/Wwindows.py
@@ -564,8 +564,13 @@
"Can't find window or widget to insert text into; copy to clipboard instead?",
1) == 1:
from Carbon import Scrap
- Scrap.ZeroScrap()
- Scrap.PutScrap('TEXT', stuff)
+ if hasattr(Scrap, 'PutScrap'):
+ Scrap.ZeroScrap()
+ Scrap.PutScrap('TEXT', stuff)
+ else:
+ Scrap.ClearCurrentScrap()
+ sc = Scrap.GetCurrentScrap()
+ sc.PutScrapFlavor('TEXT', 0, stuff)
# not quite based on the same function in FrameWork