Just to make sure I'm on the right page - for the code snippet below, how would I make
sure this is robust enough not to fail?
(i.e. how would I want to write this so that it would fail gracefully if there isn't
enough memory to allocate the handle?)
Thanks,
Ed.
MemHandle h;
UInt16 index = 0;
DmSeekRecordInCategory(gClientsDB, &index, (UInt16) itemNum, dmSeekForward,
dmAllCategories);
h = DmQueryRecord(gClientsDB, index);
if (h) {
skelClientsDBType *p = (skelClientsDBType *) MemHandleLock(h);
DrawCharsToFitWidth(p->Name, bounds);
MemHandleUnlock(h);
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/