I found what my problem was, i freed all the veriables that were needed to make the list after I drew it to the screen. I just needed to take all the lines that delt with freeing memory and moved them to a formcloseevent case.
-- Scott Erickson Software Engineer, FB-4, Inc. [EMAIL PROTECTED] "Scott Erickson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I ran into a problem getting the selection index and text of that index on >the device. My code works fine on the simulator, but on the device I am >getting junk data. Here is the section from one of my forms event >handler... > > else if(pEvent->data.ctlSelect.controlID == BlackListEdit) > { > pForm = FrmGetActiveForm(); > Char* entry = (Char*)MemPtrNew(100); > lstP = (ListType *) FrmGetObjectPtr(pForm, > FrmGetObjectIndex(pForm,BlackListList)); > StrCopy(entry,LstGetSelectionText(lstP,LstGetSelection(lstP))); > EditBlackList(LstGetSelection(lstP),entry); > FrmGotoForm(BlackListForm); > MemPtrFree(entry); > } > > The string "entry" holds junk data after the StrCopy() call. On the > simulator this veriable holds the text from the line that was highlighted > when the user pressed the Edit button on the form > (pEvent->data.ctlSelect.controlID == BlackListEdit). I need to send the > selected text to a function to load into a form and let the user edit it, > then place it back in a database in the right location to cover up the old > entry in the list. I cant figure out why it works on the simulator, but > not the device. Anyone have any ideas to why this might be? > > -- > > > Scott Erickson > Software Engineer, FB-4, Inc. > [EMAIL PROTECTED] > > -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
