Here is what is specifically is triggering the problem. I don't see how
this could be causing it. However, if I don't perform this, the error
doesn't arise.
In my event handler for the form:
case frmCloseEvent:
Set Checkmark to InfoDB
SetMain(frm, &index);
break;
// This is the function being called. Somehow after I call this
// function, it causes a problem with the index whenever I
// return to the screen where I have a table being
// dynamically being populated with database information
void SetMain(FormPtr frm, UInt *index)
{
tblInfo theInfo;
tblPackedInfoPtr p;
// Get Record - set busy bit
VoidHand record = DmGetRecord(gInfoDB, *index);
// Lock Record
p = MemHandleLock(record);
// Unpack Record
UnpackInfo(&theInfo, p);
// Write to the unpacked structure
theInfo.DistUnit = FrmGetControlValue(frm, FrmGetObjectIndex(frm,
MainMilesCheckbox));
// Repack it
PackInfo(&theInfo, record);
// Release the handle
MemHandleUnlock(record);
// Remove busy bit, set dirty bit
DmReleaseRecord(gInfoDB, *index, true);
}
--
Tim Astle
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/