What value of form ID is being passed around?

Jim Duffy <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>
> Could someone please offer guidance with using Palm preferences...
>
> First, I am using the starter stationary for my app which provides for the
> initial statements of get and set preferences in the AppStart and AppStop
> Function.
>
> What I am trying to do is simply save the Form which is open when the app
> closes and go back to that form when it is launched again.
>
> I have a single variable in the StarterPreferenceType struct
> Word CurrentView;  (is Word the correct type to use to hold a From ID??)
> then declare a global instance of that struct (prefs)
>
> then in the AppStop function I have:
>
> static void AppStop(void)
> {
>
>    prefs.CurrentView = FrmGetActiveFormID();
>    FrmCloseAllForms();
>  // Write the saved preferences / saved-state information.  This data
>  // will be backed up during a HotSync.
>  PrefSetAppPreferences (appFileCreator, appPrefID, appPrefVersionNum,
>   &prefs, sizeof (prefs), true);
> }
>
> and in AppStart I have:
>
> static Err AppStart(void)
> {
>
>     Word prefsSize;
>
>
>  // Read the saved preferences / saved-state information.
>  prefsSize = sizeof(ParaLogPreferenceType);
>  if (PrefGetAppPreferences(appFileCreator, appPrefID, &prefs, &prefsSize,
> true) !=
>   noPreferenceFound)
>   {
>   }
>
>    return 0;
> }
>
> Then in PilotMain, just after it calls AppStart I have
> FrmGotoForm(prefs.CurrentView);
>
>
> This compiles with no errors, but when I run it in POSE I get a "resource
> for form 1 not found" error.
>
>
> Can anyone explain where I'm goofing up...
>
> Thanks so much for the help.
>
> Jim
>
>
>
>





-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to