Hi, this is probably a basic question, but I haven't figured it out, here is
the code:

Tasks* TaskData[500];

 // Get data from tasks database
 OpenTasksDB();

 UInt16 TotalRecords=GetSizeTasksDB();
 for (int index=0; index<TotalRecords; index++)
 {
  TaskData[index] = new Tasks;
  TaskData[index]->Description=GetRecord(index);
 }
 CloseTasksDB();

 FormType* pForm = FrmInitForm (ID_TASKSFORM);
 TableType* table = (TableType*)FrmGetObjectPtr(pForm,
FrmGetObjectIndex(pForm, ID_TaksTbl));
 int numRows=TblGetNumberOfRows(table);

 UInt16 numTotalColumns = TblGetNumberOfColumns(table);
 for (int i=0; i<numTotalColumns; i++)
 {
  TblSetColumnUsable (table, i, true);
  switch (i)
  {
   case 0:
    TblSetColumnWidth (table, i, 15);
    break;

   case 1:
    TblSetColumnWidth (table, i, 200);
    break;
  }
  TblSetColumnSpacing (table, i, 1);
 }

//>>>The pointer turns NULL  at this point.....

 for (int i=0; i<numRows; i++)
 {
  TblSetItemStyle (table, i, 0, checkboxTableItem);
  TblSetItemStyle (table, i, 1, labelTableItem);
  TblSetColumnUsable(table, 0, true);
 }

 for (int i=0; i<TotalRecords; i++)
  TblSetItemPtr (table, i, 1, TaskData[i]->Description);

 FrmDoDialog (pForm);
........

The pForm pointer turns NULL at the point that I have indicated, what am I
missing??
I have had this happen before and I thought I had it down, but apparently
not.
I have a little concept of handles, I even tried to use one here but it was
a mess and I think I did it wrong.
any help would be appreciated.
thanx
bill


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

Reply via email to