Hi
> I need to write a string to a global variable tha will be accessed by 2 or
> more forms, but i don't know where to put it and how to access is from a
> form.
Not only, that global variables are bad style (ok, there are some, few
reasons to use them), but most important: global variables won't work on
Palm OS under all conditions (see launch codes). So just avoid them like
hell.
A workaround would be to store a dynamic allocated string pointer with
FtrSet() / FtrGet().
init(...)
{
char *strptr;
strptr = (char*) MemPtrNew(...);
FtrSet(CREATORID, StrFtrNr, (UInt32)strptr);
...
}
...
char *strptr;
FetGet(CREATORID, StrFtrNr, (Uint32*)&strptr);
...
close(...)
{
char *strptr;
FetGet(CREATORID, StrFtrNr, (Uint32*)&strptr);
MemPtrFree(strptr);
FetUnregister(CREATORID, StrFtrNr);
...
}
by(e)
Stephan
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/