Jim,

Thank you very much!
Can you mention adding this to the documentation folks for future releases?
I just (ASS)umed that the return value was Zero for all good cases and -1
for failure, so I only checked for -1. Now I can remove that additional
version field that I was keeping in my prefs structure. Excellent!

Bryan Nystrom
Natara Software, Inc.

-----Original Message-----
From: Jim Schram [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 19, 1999 12:17 PM
To: [EMAIL PROTECTED]
Subject: RE: PrefGetAppPreferences and PrefSetAppPreferences


At 9:44 AM -0700 1999/05/19, Bryan Nystrom wrote:
>This thread was somewhat thrown off by the last post, so:
>
>...can anybody give an example of how to get back the version parameter
that
>is set in  PrefSetAppPreferences? You can pass a version number as a
>parameter IN with PrefGetAppPreferences, but I don't see a way of later
>getting it back. Bob Ebert seemed to imply that you can, so I must be
>missing something.

The return value of the PrefGetAppPreferences call is the version number.
The docs are rather vague about this, however, indicating that the 'special'
value noPreferenceFound (-1) will be returned if the pref resource does not
exist.

For the curious, the version number is written into the first 16-bits of the
preference resource, and stripped when it is retrieved. The version number
and preference data are used together internally by PrefSetAppPreferences to
determine whether or not to actually write the resource to the storage heap
and thus dirty the prefs database so that HotSync will back it up.

Regards,

Jim Schram
3Com/Palm Computing
Partner Engineering


Reply via email to