Hello,
HELP !!! HELP !!! HELP !!!
I can't seem to be able to restore preferences after saving them...
(PalmOS3.5.2 w/ _lots_ of free memory)
======================================================================
Source Code:-
-------------
MemHandle Foo = MemHandleNew(64);
MemPtr Bar = MemHandleLock(Foo);
UInt16 PrefLen;
HostTraceOutputT(appErrorClass, "+++ ORIGINAL FIELD:-");
HostTraceOutputB(appErrorClass, (const unsigned char*)FldGetTextPtr
(ObjectPtr(Field)), StrLen(FldGetTextPtr(ObjectPtr(Field))));
if(FldGetTextPtr(ObjectPtr(Field)) != NULL) {
PrefSetAppPreferences('NILE', 1, (UInt16)1, (const void*)FldGetTextPtr
(ObjectPtr(Field)), StrLen(FldGetTextPtr(ObjectPtr(Field))), true);
HostTraceOutputTL(appErrorClass, "=== SAVING PREFERENCES ===");
HostTraceOutputB(appErrorClass, (const unsigned char*)FldGetTextPtr
(ObjectPtr(Field)), StrLen(FldGetTextPtr(ObjectPtr(Field))));
PrefGetAppPreferences('NILE', 1, Bar, &PrefLen,1);
HostTraceOutputTL(appErrorClass, "+++ Got Prefs");
HostTraceOutputB(appErrorClass, (const unsigned char *)Bar, PrefLen);
}
MemHandleUnlock(Foo);
MemHandleFree(Foo);
======================================================================
Palm Reporter:-
---------------
+++ ORIGINAL FIELD:-
39 39 39 999
=== SAVING PREFERENCES ===
39 39 39 999
+++ Got Prefs
00 00 25 ..%
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/