"Jim Duffy" <[EMAIL PROTECTED]> wrote in message
news:40258@palm-dev-forum...
> The char arrays to hold these lists are stored in the app preferences and
> are declared as follows:
>
> {
> .
> .
> char *List1[17];
> char *LIst2[17];
> char *List3[17];
> char *List4[17];
> char *List5[17];
>
> } MyAppPreferenceType;
This is your problem, Jim. You jave five arrays of character pointers
stored in your preference. These strings are allocated and stored on the
dynamic heap. When you store this preference and your application quits,
you lose the dynamically allocated strings, since the heap goes away.
Instead of doing this, you need to store the actual string values in your
preferences. You could do this by having 17 * 5 different preference
entries with different indices, each storing one string, or by bundling the
strings together into just one (or 5) preferences. One way or another, the
actual character data for the strings needs to be put into your preference
entries and the pointers to the strings regenerated at runtime.
--
Ben Combee
Veriprise Wireless <http://www.veriprise.com>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/