[Pythonmac-SIG] GetScrap -- use of?

Joseph J. Strout joe@strout.net
Mon, 22 Feb 1999 11:30:52 -0800


Anybody (Jack?) know how to use Scrap.GetScrap?  The docstring on it sez:

	(Handle hDest, ResType theType) -> (long _rv, long offset)

According to Inside Mac, I should be able to pass a null handle for the
first parameter if I just want to see whether a certain type is on the
clipboard.  But neither of these works:

>>> Scrap.GetScrap(None, 'TEXT')
TypeError: Resource required

>>> Scrap.GetScrap(0,'TEXT')
TypeError: Resource required

I also can't figure out how to get the data; there's apparently no
"NewHandle" function available from Python, and passing a string as the
first parameter gives me the same error.  Perhaps the error refers to the
second parameter, and I'm supposed to pass something other than a string
for theType?

I even did a global search on all .py files under the Python directory,
including the IDE and Demo folders, and GetScrap doesn't occur anywhere.
I'm stumped on this one... any help will be greatly appreciated!

Thanks,
-- Joe
,------------------------------------------------------------------.
|    Joseph J. Strout           Biocomputing -- The Salk Institute |
|    joe@strout.net             http://www.strout.net              |
`------------------------------------------------------------------'