> That still doesn't answer the rest of the question.. why does the Get Pref
> call return something other than the version number passed to it or
> noPreferencesFound? I call it with a version number of 0 and get back 1..
> doesn't that contradict the documentation?
PrefGetAppPreferences doesn't take a version number as an argument; it takes
an ID as argument and returns a version number.
Let's assume we're talking about a particular application's preferences.
These are identified by preference IDs. These are typically small numbers
(0, 1, etc). This allows an application to have several separate "preference
records" for different purposes. The system can only store a single
"preference record" for a given ID. When you call PrefSetAppPreferences,
it'll overwrite the existing "preference record" if any existed. When a
"preference record" is written, a version number is saved along with it.
When it's later retrieved, the version number is retrieved as well. The
version number is typically a small number (0, 1, etc), but it's independent
from the preference ID.
You're calling PrefGetAppPreferences, asking for the "preference record"
with ID 0. You're getting back a "preference record" with ID 0 and version
1.
Does that make sense?
-
Danny
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/