> My code goes somthing like this....
>
> #define AppFileCreator 'test'
> #define PreferenceID 0x00
> #define Version 1
> Char somechar[25] = "";
>
> static void SavePrefs()
> {
> DBStruct prefs;
>
> StrCopy(somechar, "SomePreferenceText");
> prefs.charpref = somechar;
> PrefSetAppPreferences(AppFileCreator, PreferenceID, Version, &prefs,
> sizeof(DBStruct), true);
> }
>
> static void LoadPrefs()
> {
> DBStruct prefs;
> UInt16 prefSize;
>
> prefSize = sizeof(DBStruct);
> if (PrefGetAppPreferences(AppFileCreator, PreferenceID, &prefs,
> &prefSize, true) != noPreferenceFound)
> {
> StrCopy(somechar, prefs.charpref);
> }
> }
>
> And all of this works fine while I'm running the program but when I exit
and
> come back everything is blank... but it doesn't give me a
noPreferenceFound
> error so I'm assuming it finds it but just doesn't return anything.....
well to start with, you are not doing yourself any favours by trying to save
a pointer (prefs.charpref).
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/