From: "Richard Burmeister" <[EMAIL PROTECTED]>

> Since you never create any app preferences, the only value it should be is
> noPreferenceFound (-1).

Yes, I know.. that's why I was confused.

> 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?

I'm still using the old data types because this is old code that has always
worked in the past and it just hasn't been upgraded here yet.. The problem
reared its head because in this particular application, its very sensitive
to the creation of those preferences on the first run.. initializations and
all that.. Optimizations are fully on, so no, I am not sure that I am
receiving the 1 there, but there is other evidence that it is NOT
noPreferenceFound... my real code looks something like:

prefVer = PrefGetAppPreferences('MYID', 0, &RegPrefs, &wSize, true);
if (prefVer == noPreferenceFound)
{
   // do initialization
}
else
{
   // depend on the fact that the initialization was done.. if not, app go
BOOM
}

Now, of course, the app preferences get set eventually so that the else
clause is valid in the future.. and like I said, this is old code that has
worked in the past.. and honestly, still does except when it is a fresh POSE
session.. if I delete the application using the Launcher under POSE, then
reinstall it to POSE, prefVer is noPreferenceFound on the first run as
expected.

I will try and write a quick application that shows the problem with no
other distractions and post it later today.



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

Reply via email to