[Pythonmac-SIG] parameters to Scrap.GetScrap( ??, ??)
Joseph J. Strout
joe@strout.net
Fri, 22 Oct 1999 20:52:29 -0700
At 8:10 PM -0700 10/22/99, James B. Wilkinson wrote:
> length, offset = Scrap.GetScrap(None, 'TEXT')
>TypeError: Resource required
I think it's your first resource that's the problem. It should be a
resource handle -- I don't think Python's GetScrap supports the behavior of
peeking at the scrap without getting it. So do
hdl = Res.Resource('')
length, offset = Scrap.GetScrap(hdl, 'TEXT')
or something like that (typing from memory here).
Cheers,
-- Joe
,------------------------------------------------------------------.
| Joseph J. Strout Biocomputing -- The Salk Institute |
| joe@strout.net http://www.strout.net |
`------------------------------------------------------------------'