Pit wrote:

This is also actually logic. But when i store a char** in the prefs, i can
not get it back, when i
call the following

UInt16 size = sizeof (AppPrefs);
PrefGetAppPreferences (CREATORID, 0, &myAppPrefs, &size, false);

myAppPrefs.itemStrings1 shows invalid pointer



Hi Pit, You are storing a pointer in your prefs. It's 4 bytes long, and is just an address to whatever you pointed that variable, at the time you pointed it. You probably ARE retrieving the same pointer address, but by the time you get that pointer back, the memory address has been filled with something else, not your original string. If you want to store a string in the Prefs then you have to assign some memory for it in the Prefs structure itself (as Chris mentions in his response). Bob.




--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to