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