Tom, thanks for the reply, here's what the code looks like:

---------------------
        ListMakerPrefType       prefs;

        // Send a frmSave event to all the open forms.
        FrmSaveAllForms();

        // Close all the open forms.
        FrmCloseAllForms();

        // Write the preferences / saved-state information.
        prefs.currentListDBID                   = CurrentListDBID;
        prefs.dontWarnAboutDuplicates   = DontWarnAboutDuplicates;
        prefs.noteFont                                  = NoteFont;
        prefs.typeToScroll                              = TypeToScroll;
        prefs.turnDownWhenAdding                = TurnDownWhenAdding;
        prefs.defSortCheckedAtEnd               = DefSortCheckedAtEnd;
        prefs.defAlwaysSort                     = DefAlwaysSort;
        prefs.defSortAlpha                              = DefSortAlpha;
        prefs.defShowDates                              = DefShowDates;
        prefs.defShowPopups                     = DefShowPopups;

        PrefSetAppPreferences(LMDBCreator, LMPrefID, LMVersionNum, &prefs,
sizeof(ListMakerPrefType), true);


---------------------
LMDBCreator, LMPrefID, and LMVersionNum are all #defines.

Any thoughts?



At 8:43 PM -0400 4/6/99, Tom Zerucha wrote:
>On Tue, 6 Apr 1999, Dan Hewins wrote:
>
>> My app crashes when it's exiting when it's sitting in Flash memory.  (I
>> used FlashPro to load it into Flash.)
>>
>> I did a stack trace in the Palm Debugger and this is what I got:
>
>Nothing there should cause a problem, but...
>
>> Does this mean that the crash is occuring in PrefSetAppPreferences or
>> something else?
>
>Are any of the things PrefSetAppPreferences point to in Flash?
>
>How are you determining the size of the preferences?
>
>Are there any global strings (are these copied?) or other things which
>should not be changable, so you have an unintended hardware enforced const
>now, and it only worked before because the string (or whatever) was
>writable?
>
>Does it still lock if you disable that one call (to PrefsSet...)?
>
>> Is there anything I can do to make my app work if it's in flash?  How do
>> other apps set prefs if they're in flash?
>
>The apps are normally set in the prefs database (SavedPref.prc/pdb or some
>such).  I don't have a problem when I use this call.
>
>I do have a problem in a different version that tries to write a resource
>(they are databases, but of the .prc form instead of the .pdb form).



Reply via email to