--- Tim wrote:
>
> Is there a way to save settings to some
> type of "ini" like file in the PalmOS?
> What I am trying to do is this, when they
> hotsync, I refresh the database information
> on the palm, then when they start the app
> (for the first time only) I want it to make
> sure the DB is sorted. Any help would be
> appreciated. Thanks!
>
See PrefSetAppPreferences(). In your AppStart(),
check if prefs exists and if not, create them. You
can store whatever you want there. Normally app prefs
are used to store info like the current form, game
state, etc.
Sample code:
YourPreferenceType prefs;
UInt16 prefSize;
prefSize = sizeof( prefs );
if ( PrefGetAppPreferences ( AppFileCreator, 0,
&prefs, &prefSize, true ) != noPreferenceFound )
{
// get preferences, e.g.
gRunCount = prefs.runCount;
}
else
{
// create default preferences and save them
prefs.runCount = 0;
PrefSetAppPreferences ( AppFileCreator, 0,
AppVersion, &prefs, sizeof( YourPreferenceType ), true
);
}
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/