[futurebasic] Re: [FB] Handles

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

From: "William P. Riley-Land" <wrileyla@...>
Date: Sun, 22 Nov 1998 20:33:57 -0600 (CST)
> I want to read data from a file, and then create a resource from the inputed
> data.  Before that, I wanted to "patch" the handle at a specific byte
> location before making it into a resource...
>  OPEN "I",1,"ccl",1,SYSTEM(_aplVol)
>   cclH&=FN NEWHANDLE (942)
>   LONG IF cclH&
>     READ FILE #1, [cclH&],942
>     POKE @cclH&+242, ASC ("A")
>     CALL ADDRESOURCE (cclH&,_"ccha",128,"")
>     BEEP
>   END IF
> If I comment out the POKE statement, it makes a resource. When the POKE
> statement is used, it doesn't work.  I've also found that if I merely copy
> the handle to another file (with the POKE) the change takes place. Does
> anyone know how
> modify a handle *and* make it a resource?

I am having a similar problem, though I load the handle from a Resource file, 
then poke things in according to what has changed, and then CALL CHANGEDRESOURCE
 and then UPDATERESFILE, but to no avail, i alos have tried WRITERESOURCE....  
any hints to what I am doing wrong?