Hi,
I�ve crated the popup and set the list ID of the list. I fill the list from
a DB, using a custom draw procedure that works OK.
When I run the app. I get an error "...have just read directly from low
memory..."
When I click the pop up, it displays the list, I select an item and set the
lablel of the popup (I saw it debugging), but after that, when It leaves the
popSelectEvent I get the error.
For extra information, perhaps it is useful, is that if I return True
instead of False from the popSelectEvent, is sets the label and then, I
don�t get any error, but then it don�t display the list again when the popup
is clicked (because I returned false)
If anyone can help me I will appreciate so much. I�m in a new job (and also
new in CW), and I cannot get the cause of the error, so I�m very worried
about it. I have tried a lot by my own before posting this message, but ....
Thanks in advance, and please excuse my english.
Here is the code:
case frmOpenEvent:
{
pForm = FrmGetActiveForm();
FrmDrawForm(pForm);
/* Drawing the list */
list = (ListType *) GetObjectPtr(MainClientesList);
LstSetDrawFunction(list, customDraw);
LstSetListChoices(list,NULL,2);
LstDrawList(list);
/* Hiding the list, b/c Its "border" are visible
controlIndex = FrmGetObjectIndex(pForm, MainClientesList);
FrmHideObject(pForm, controlIndex);
handled = true;
}
break;
case popSelectEvent:
{
Int16 index;
popTrig = (ControlType *) GetObjectPtr(MainClientesPopTrigger);
list = pEvent->data.popSelect.listP;
popTrig = pEvent->data.popSelect.controlP;
/* seting the label of the trigger */
label = (char *) CtlGetLabel(popTrig);
recHandle = DmQueryRecord( clieDB, LstGetSelection(list) );
index=pEvent->data.popSelect.selection;
recHandle = DmQueryRecord( clieDB, index);
recPtr = MemHandleLock( recHandle );
StrCopy( label, recPtr + clieDB_NOMBRE_START);
MemHandleUnlock( recHandle );
CtlSetLabel(popTrig, label);
handled=false;
}
break;
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/