Hi,
I am still working on my first Palm Pilot program and am running into a
couple snags. Using the example in the Palm Programming: The Devolper's
Guide book I have created a person structure that includes:
const char *LastName;
Stupid question, but why would you want to use const if you plan on chaning
the data? Because I am using multiple forms to display the data for each
record, I have made a global person record to store the record being edited.
I have a function that copies the field data to the record and the record
data to the fields when the user switches forms.
1)Using the line:
FldInsert(fpLastName,gPerson.LastName,StrLen(gPerson.LastName));
I get the error:
: In function `LoadRecordToScreen':
:321: warning: passing arg 2 of `FldInsert' discards `const' from pointer
target type
2)Also when initializing a person for a new database, I use the following:
UInt index = dmMaxRecordIndex;
VoidHand h = DmNewRecord(gPersonDB, &index, 1);
but it gives me parse error before index and then 'h' undeclared.
3)In my Init number of persons function, for the line:
ListPtr list = GetObjectFromActiveForm(lstPerson);
I get the error:
:862: warning: initialization makes pointer from integer without a cast
Thanks for any help in advance,
Ken
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html