In article <Meessen-220792090830@130.104.58.7> Meessen@slig.ucl.ac.be (Christophe Meessen) writes:
>
>DrawString is one of the Routines that may move or purge memory. It is
>indeed essential to lock the handle and make shure it's unpurgeable. This
>should be the case if you didn't set the purgeable option in the info box
>of the 'STR ' resource.
>
We ran into an interesting purgeable problem. We have a reosurce CSTR which is basically a zero terminated string. An external command for HyperCard, getStr, does a GetNamedResource, then a DetachResource and returns the handle to HyperCard.
Well... If the CSTR was purgeable, then the HANDLE is also purgeable, and
a piece of script like:
put GetStr("fooStr") into gFoo
where gFoo is a HyperTalk global, gets rather interesting when memory runs low.
The global will suddenly contain garbage, as HyperCard had just kept the handle
I passed to it around. The handle was purged behind HyperTalk's back and
whammy, things got wierd.
--
Steve Riggins Internet: stever@netcom.com
AppleLink: Voyager.geek AOL: RigginsS
CompuServe: 75300,1635 "Can never have enough EMail addresses"