"Robert Baruch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > Can someone tell me what's wrong? In my program, when LstSetListChoices is hit, the emulator dies with an array index out of bounds. > > Here's the code fragment: > > static void displayCallLog() > { > ListType *list; > char *duration; > char *testArray[] = {"one", "two", "three", "four", "five"}; > > list = FrmGetObjectPtr( > FrmGetFormPtr(GetCallLogForm), > CallLogTable); > LstSetListChoices(list, testArray, 5); > LstDrawList(list); > > } > > ..... > Thanks for any help and advice! > > --Rob >
Actually, CallLogTable must be an object index not an object ID. Is it? ---------------- void *FrmGetObjectPtr (const FormType *formP, UInt16 objIndex) Parameters -> formP Pointer to the form object (FormType structure). -> objIndex Index of an object in the form. You can obtain this by using FrmGetObjectIndex --------------- Ralph -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
