On Thu, 22 Apr 1999, Eric House wrote:
> > > > What is the best way to store strings like that?
>
> > Storing them as resources I think is the best use of
> > your memory, because they will not be taking up part of
> > your precious 32k code segment, and they will only
> > be taking up your valuable heap space when they are
> > loaded & being used. Also it allows for localization
> > (i.e. translation into foriegn languages) if you're into
> > that sort of thing. The downside is that it takes a
> > little extra code and a lot of discipline to put all
> > your string literals into a resource.
>
> Isn't the "extra code" dwarfed by the 8-10 bytes *per string* consumed
> by resource header information? That's why I've been postponing
> moving my user-visible strings into resources. They're already
> #defined in separate human-language-specific .h files for localization
> purposes.
>
> Or does PalmOS have a string list resource like the Mac's 'STR#'?
You can put multiple strings into one resource (and can even invent your
own). There is also the:
VoidHand SysFormPointerArrayToStrings(CharPtr c, Int stringCount)
function that unpacks it if you don't want to find the pointers to the
individual strings yourself.