At 5:18 PM +0100 16-03-00, Dave Lippincott wrote:
>I never was able
>to successfully resize a selector and not cause some sort of memory problems
>down the road. (at least in OSs 3.0, 3.1 and 3.3)
Right. The text for the label is actually jammed right into the form
object, after the label structures and before the next form object. So if
you copy too many characters into that buffer, you overwrite the start of
the next form object, and that can lead to "object not found" errors or
worse. Sometimes we also see objects disappearing, because the overwrite
messes with their bounds and moves the off-screen.
You can't resize the buffer without adjusting a whole bunch of other
pointers in the form, and that's a pain. So the easy workaround is just
make sure the buffer is big enough to support the longest string you'll
ever fit there. The easy way to do that is set the label to a long enough
string in constructor.
--Bob
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html