R�gis Daniel de Oliveira wrote:
I'm pretty sure your problem is that you're putting code ahead of variable declarations in the code block.I would like to make a function that will be called from the frmOpenEvent and will populate a list with some records.I have been made the function and the database access is working well but, when i implement the routines to clear the list and the points to the list, the compiler generates a error. Does anybody knows what is going wrong???
Try putting the Err err; declaration earlier on.
<OT> I've read that using variables that differ only by capitalization (such as Err and err) is a bad idea. You might also consider indenting your code blocks.</OT>
matt
>
> void loadRCAS(UInt16 Modo)
> {
> Err error; // put declaration here, before other code
>
> ////////////THE ERROR APPEAR WHEN I PUT THE FOLLOWING LINES:
>
> ListType *lstP;
> FormType* frmP = FrmGetActiveForm();
>
> lstP = (ListType *) FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP,
> lstTCAS));
>
>
> /////////////////////////////////////////////////////////////////////
>
> //looks if the database is already open...
>
error = Open();
> if(error)
> return;
> else
> {
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
