static void AppStop(void)
{
        char* prefs;

        // Write the saved preferences / saved-state information.  This data 
        // will saved during a HotSync backup.
        prefs=autoText; //I have tried using StrCopy -> when runing the 
application a error code is beening showed. 
        PrefSetAppPreferences (appFileCreator, appPrefID, appPrefVersionNum, 
                &prefs, sizeof (char*), true);
        // Close all the open forms.
        FrmCloseAllForms ();
}

static Err AppStart(void)
{
        char* prefs;
        // Read the saved preferences / saved-state information.
        prefsSize = sizeof(char*);
        if (PrefGetAppPreferences(appFileCreator, appPrefID, &prefs, 
&prefsSize, true) != noPreferenceFound)
                {
         autoText = prefs; // I tried here a StrCopy command but it's not 
working...
            }
else
   autoText="<none>"
return errNone;
}

I hope this is correct, in my original code I am using a structured variable. 
AppInfo, and the text field that I want to remember is in a autoText variable;
Something like :
typedef struct{
UInt32 var1;
UInt16 var2;
:
char * autoText;
:
}AppInfo;

The AppInfo gAppInfo; // global variable;
I have modified the code because for this particular variable (autoText) I'm 
having problems. The rest I correct.

Regards, Iulia


-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to