Ah - yeah. I read it as he wanted to store multiple copies of the struct - my mistake.
Well a simple strcpy/memmove should do .. On Wed, 13 Feb 2002 11:25:51 -0800, Palm Developer Forum <[EMAIL PROTECTED]> said: >Was Fergal asking about having more than one preference structure, or how to >get the one particular structure he showed working? > >There's nothing special about including character arrays in a structure, so >what you're trying to do should work. What do you mean by "work beyond the >first char member"? Are you sure you're not just trying to store into those >arrays incorrectly? You should be using StrCopy to get your strings written >into those arrays. > >Mark Peters > ><[EMAIL PROTECTED]> wrote in message news:76513@palm-dev-forum... >> >> PrefSetAppPreferences(creatorid, 0, version, &struct1, sizeof(MyAppPrefs), >true): >> PrefSetAppPreferences(creatorid, 1, version, &struct2, sizeof(MyAppPrefs), >true); >> >> Look up the meaning of the second arg to PrefSetAppBlabla in the Reference >guide. >> >> On Wed, 13 Feb 2002 16:25:50 -0000, Palm Developer Forum ><[EMAIL PROTECTED]> said: >> >Hi >> >How can I have an application preference with multiple strings in it like >> > >> >typedef struct{ >> > int id; >> > int count; >> > char name[20]; >> > char pass[20]; >> >}MyAppPrefs; >> > >> >I have tried using the above struct as the prefs paramater of >PrefSetAppPreferences and using the pack/unpack method but neither work >beyond the first char member. >> > >> >Can this be done using preferences or do I need to use a separate >database? >> > >> >Thanks >> > >> >Fergal. >> > >> >-- >> >For information on using the Palm Developer Forums, or to unsubscribe, >please see http://www.palmos.com/dev/tech/support/forums/ >> > >> >> > > > >-- >For information on using the Palm Developer Forums, or to unsubscribe, please see >http://www.palmos.com/dev/tech/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
