> From: D B
>
> TblSetCustomDrawProcedure (tableP, 0,
> MainViewDrawRecord);
>
> and evry time i compile i get the following warning,
where is the "following warning"?
> which i'd like to get rid of as i'm also getting a bus
> error fatal alert when i run the application..
>
> static void MainViewDrawRecord(MemPtr tableP, UInt16
> row, UInt16 column, RectanglePtr bounds) {
both of those UInt16's should be Int16's
>
> MemHandle recHandle;
> Char* recText;
> UInt16 recNum = 0;
>
> // record number that corresponds to table
> // item to draw.
> recNum = TblGetItemInt (tableP, row, column);
>
> // Retrieve record from database &lock it down
> recHandle = DmGetRecord(tctDB, recNum);
> recText = MemHandleLock(recHandle);
You have no error checking here. What if DmGetRecord failed?
Also, do you really mean to always get record #0, or is that just for
testing?
>
> // Draw the record
> MainViewDrawRecordInBounds(recText, bounds);
without seeing MainViewDrawRecordInBounds, there is no way to know what it
might be doing.
> // Unlock the handle to the record.
> MemHandleUnlock(recHandle);
>
> // Release the record, not dirty.
> DmReleaseRecord(tctDB, recNum, false);
> }
>
> anyone know what the problem is here...?
> Cheers
thanks for the cheers.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/