I have a popup trigger connected to a static list.
The following code executes flawlessly:
case frmOpenEvent:
pForm = FrmGetActiveForm();
pList = FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm, listId));
LstSetSelection(pList, selectionIndex);
CtlSetLabel(FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm,
popupTriggerId)), LstGetSelectionText(pList, selectionIndex));
However, after the for is dispolayed, when I click on the trigger, I get the
"Object not in form" error. The stack list at this point shows the error in
FrmDispatchEvent(), for a ctlSelectEvent with controlId = popupTriggerId.
If I capture the ctlSelectEvent, and return true from my form's event handler,
the error doesn't happen, but it also prevents the list from being displayed.
I'm using the Eclipse-based Palm OS Developer Suite and targetting Palm OS 3.5
(app must run on my Palm IIIx). I've checkd the trigger-list link in both the
resource editor and hte .xrd file itself and everything looks correct.
I use this same trigger and list combo on other forms of this app with no
problem (adjusting the id's for each form of course). It also worked on this
particular form before I added some code to handle repeat events, and also some
code to change various label texts on the form in response to various events.
Does anyone have any advice on what else to look at?
While I am a career C++ coder, this is my first attempt at a Palm app.
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/