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

Skip to content

Commit 6529368

Browse files
committed
Use the Carbon scrap manager interface if the old interface isn't available.
1 parent 9cf00dd commit 6529368

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Mac/Tools/IDE/PyBrowser.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,13 @@ def domenu_copy(self, *args):
291291
text = string.join(selitems, '\r')
292292
if text:
293293
from Carbon import Scrap
294-
Scrap.ZeroScrap()
295-
Scrap.PutScrap('TEXT', text)
294+
if hasattr(Scrap, 'PutScrap'):
295+
Scrap.ZeroScrap()
296+
Scrap.PutScrap('TEXT', text)
297+
else:
298+
Scrap.ClearCurrentScrap()
299+
sc = Scrap.GetCurrentScrap()
300+
sc.PutScrapFlavor('TEXT', 0, text)
296301

297302

298303
class Browser:

0 commit comments

Comments
 (0)