Thanks, that worked. I had been trying FrmCopyLabel which of course didn't reset that pointer.
"Ben Combee" <[EMAIL PROTECTED]> wrote in message news:100943@;palm-dev-forum... > > At 15:34 2002-11-13 -0500, you wrote: > >When the user selects an item from another list on the form, I need to > >repopulate the list control with a new list. I do this in the > >popSelectEvent of the first list. So when this happens, I free the > >ListStr[] pointers, then repopulate it with a new set of strings, and call > >LstSetListChoices and LstSetHeight again with the new values. This works > >fine for a few times, but then I eventually get an error is POSE that it is > >reading from an unallocated chunk of memory. What it appears to be doing > >when the error happens is refreshing the label in the trigger control from > >the old ListStr[] pointer which of course no longer exists. I can't seem to > >track what it is exactly doing but it is not happening in my code anywhere. > > When you change the list choices, explicitly reset the label in the popup > trigger using CtlSetLabel -- this control doesn't have a copy of the label > string, it actually points to the string that was contained in the list and > now has been replaced. > > -- > Ben Combee <[EMAIL PROTECTED]> > CodeWarrior for Palm OS technical lead > Palm OS programming help @ www.palmoswerks.com > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
