> > --- Rohit_Shankar wrote: > > > FormPtr frm = FrmGetActiveForm(); > > > fldPtr = FldNewField((void **)frm, ...
--- I wrote: > > 1. You didn't declare fldPtr. --- Rohit_Shankar <[EMAIL PROTECTED]> wrote: > Do I need to allocate memory to the fieldPtr .... The docs for FldNewField say it "Create[s] a new field object dynamically and install[s] it in the specified form." FldNewField returns a (FieldType *), which is a FieldPtr. So, you don't allocate memory for a FieldType; you just create a pointer to a FieldType and assign the result of FldNewField to that pointer, like so: FieldPtr fldPtr; FormPtr frm = FrmGetActiveForm(); // ... fldPtr = FldNewField( (void **)&frm, ... ); If this isn't obvious to you, then you may need to learn more about programming and the C programming language before you write programs for Palm OS handhelds. __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
