Use the Carbon scrap manager interface if the old interface isn't available.

This commit is contained in:
Jack Jansen 2001-12-31 15:08:04 +00:00
parent 9cf00dd551
commit 65293680aa
1 changed files with 7 additions and 2 deletions

View File

@ -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: