[futurebasic] Re: Re: [FB] Preference Resources

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1998 : Group Archive : Group : All Groups

From: BMichael@...
Date: Wed, 18 Nov 1998 22:30:47 EST
>I took a look at pGreplaceXRes.  It calls another function called
>pGreplaceRes--and guess what?  pGreplaceRes sometimes DISPOSES the
>handle you pass to it, after updating the resource(!).  That would
>certainly explain what you're seeing.  To work around this, you should
>probably create an extra, "expendable" handle which contains a copy of
>the same data, and pass _that_ to pGreplaceXRes.

That will work, if you're careful; although the absolutely-safe way is to 
"re-get" your resource immediately after writing it. It won't require a 
disk access, and will get around any disposed-handle problems. Just take 
the XELSE out of there, and put the GET after the END IF.

Bill