I have a form with about 30 UI elements on it, including three popup lists.
The app was working fine with no memory leaks, passing the 1 million Gremlin
test, etc. I tried to add a fourth popup list to the form and started
getting bus errors requiring a soft reset on the emulator whenever I tap one
of the buttons to popup a modal form. If I remove the fourth popup trigger,
all the problems go away.

Is there a maximum number of UI elements for one form


My (archaic, I know) setup:

CW Pro 5 running on Mac OS 9.2
MW IDE 4.2.5
Palm OS SDK 4
Large code model
Static lists associated with all of the popup triggers.
Identical code for setting and getting the selection of each list on form
initialization and close:

 
for setting the 

    // Set the case type trigger and list.
    lst = GetObjectPtr (MtbxEditAnestypeListList);
    ctl = GetObjectPtr (MtbxEditAnestypePopTrigger);
    if (recordP.iMtbxIntVar[mIntProcType] != noChoiceSelected)
        {
        
        LstSetSelection (lst, recordP.iMtbxIntVar[mIntProcType]);
        label = LstGetSelectionText (lst,
recordP.iMtbxIntVar[mIntProcType]);
        CtlSetLabel (ctl, label);
        }
    else
        {
        LstSetSelection (lst, noChoiceSelected);
        label = LstGetSelectionText (lst, noChoiceSelected);
        CtlSetLabel (ctl, label);
        }    
        
for saving the changes:

    // Compare the case type in the dialog with the one in the record.
    // Update the record if necessary.
    lst = GetObjectPtr (MtbxEditAnestypeListList);
    lstChoice = LstGetSelection (lst);

    
    if (lstChoice != noListSelection &&
         packedRecP->iMtbxIntVar [mIntProcType] != lstChoice)
        {
        DbChangeRecord (ASTv3DB, &CurrentRecord, mtbxProc, mIntProcType,
&lstChoice);
        dirty = true;
        }
    


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to