The return value of PrefGetAppPreferences is the version number. If I recall
correctly, this is not clearly documented in the SDK docs, but that is what
the return value is.

Regards,
Dave Carrigan

----- Original Message -----
From: "Ralf Zimmermann" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Cc: "Philip Sheard" <[EMAIL PROTECTED]>
Sent: Saturday, December 30, 2000 12:26 PM
Subject: Re: PrefSetAppPreferences: id & version


> > I am using the function PrefSetAppPreferences() and i am wondering about
> two parameters:
>
> > 2) What is the parameter 'version' used for?
> > - Does anyone have an idea?
>
> it is used to allow a new version of the application to access preferences
> that are incompatible with the previous version.
>
> > - What happens if the version of the application retrieving the
> preferences with
> > PrefGetAppPreferences() has a different version number?
>
> nothing. that is the whole idea. suppose you upgrade an application from
> version, with different preferences. the first time the new version is
run,
> it tries to retrieve the new version of the preferences. when this fails,
it
> can assume that it is running for the first time.

That sounds good, but in PrefGetAppPreferences(), there is no parameter
called "version". So, how can i find out if the preferences with a given
version are available or not?
There is a function called PrefGetAppPreferencesV10(), which i did not wa
nt to use at it seemed rather outdated. However, this function has a
parameter "version".

Right now i am planning to store the version of the application/preferences
in the preferences itself. This is how i was planning to know about old
versions.
It seems to work for now, but still i would like to get the whole idea
behind the preferences concept. Usually if you use something you don't
understand fully, then later it comes back on you in a bad way.

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



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