[futurebasic] Re: [FB] String resource problem

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2008 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Thu, 17 Jan 2008 18:50:59 +1300
Joe Lertola wrote:

> I have been using many functions from PG's STR# include file for  
> years with great success. (I have cobbled some of them together to  
> make the demo below.) Mysteriously the I have been having trouble  
> with string resources over the last few weeks. In the demo below a  
> resource file is opened or created and then 3 strings are saved in a  
> STR# resource. This seems to work fine. I can see the strings if I  
> open the resource file in Rezilla.
> Subsequently when I check the number strings in the resource I get  
> wrong information. The first word of the STR# resource should give  
> the number of strings in the resource. But when I run the demo I get  
> a number like -24474 instead of 3. I think that the call to FN  
> GETRESOURCE in the fn checkResFile function must be returning bad  
> information but I have no idea why. Can anyone see what the problem  
> is here?

You are not initialising the proto-STR# Handle correctly.
rH = FN NewHandleClear( 2 )

Robert P.