[futurebasic] Re: [FB] What's the best way to update a resource?

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

From: Joe Lewis Wilkins <PepeToo@...>
Date: Wed, 12 Jan 2000 18:18:39 -0800
Mark G wrote:

> I have my prefs stored in a resource file.  If the user changes the
> prefs, then I need to change the settings in the prefs resource.  Right
> now I'm doing this by manually copying the new prefs into the resource
> handle in memory, then calling the necessary Toolbox routines to write
> the resouce to disk.  Is there a way to get the Toolbox to change the
> resource content instead of having to work with blocks manually?

If you're going to store Preferences in the Program's Resources, why not do it
the easy way using the STR# Resources? Then all you need are the STR# FN and
the DEF APNDSTR Statement to pick up and change the Preferences. See the Ref
Manual. There are a few wrinkles, but it's real easy.

Joe Wilkins