> From: Bradly J. Barton
>
> Ok.. I've given up trying to figure this one out, so
> I am turning it over to the brain trust of the list...
> consider this code (Yes, I know there is no event loop,
> don't fret that.. that's not where the problem is):
>
> DWord PilotMain(Word cmd, Ptr cmdPBP, Word launchFlags)
> {
> Err err;
> // Check for a normal launch.
> if (cmd == sysAppLaunchCmdNormalLaunch)
> {
> sRegPrefs RegPrefs;
> Word wSize = sizeof(sRegPrefs);
> Int16 prefVer = PrefGetAppPreferences('MYID', 0,
> &RegPrefs, &wSize, true);
> }
> return 0;
> }
>
> Now.. start a fresh POSE session and run this under
> the debugger.. prefVer equals 1 .. the only two values
> it SHOULD equal according to the documentation is 0
> or -1 (noPreferencesFound).
>
Since you never create any app preferences, the only value it should be is
noPreferenceFound (-1).
I get -1. (I did change your code to use the new data types, however. Why
are you still using the old headers?) Have you turned off all optimizations
so you know that you are really seeing the current value of prefVer when you
step through your code?
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/