[futurebasic] Re: [FB] Re: how to avoid writing to the application's resource

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2002 : Group Archive : Group : All Groups

From: David Cottrell <David.Cottrell@...>
Date: Tue, 14 May 2002 10:32:40 +1000
On Tuesday, May 14, 2002, at 03:40  AM, MoorePrint@... wrote:

>
> Thanks for your suggestions, I think updating the application resources 
> from
> data in an external data file is probably more to my liking. But why 
> can't
> the application find the pop-up menu resources in the external file or 
> in
> memory?
> There has been some discussion about the resource stack and resources 
> coming
> from various external files on accident... I can't even do it on 
> purpose!
> What gives?
>
> Does pG have the capability to force itself to look only in the 
> application
> file and no where else for pop-up menus and STR#? If so, maybe I could
> overide those 2 specific functions?

Looking at the code for FN installPop I see that it just does a 
GETMHANDLE so all you need do is ensure that the correct resource fork 
is the current one at the point this function is called (CALL 
USERESFILE(yourtargetresFile)) You might be hitting the wrong resource 
because it exists in two locations but your applications resource fork 
is current. Dont forget to leave things the way you found them (look at 
the code for FN pGget1Res as a model)

STR# resources are called with GETRESOURCE so the same would hold there 
I think. Watch out for calls to FN pGget1Res as they only look in a 
particular resource fork (I prefer to do things this way myself when 
jumping between sets of open resource forks).

I cant help thinking that this is the hard way to do this :)
- but I don't know your specific situation.

Cheers

David