CtlSetLabel keeps a pointer. This requires that the string you are
pointing to has at least the same scope as the form.
Passing a pointer to a variable on the stack will cause your program
to crash.
Roger Stringer
Marietta Systems, Inc
Creators of the Marietta PDE (tm) RAD software for the Palm OS (tm)
----------------------------------------------------------------------
>Subject: RE: Bus Error on CtlSetLabel
>From: "Scott L. Johnson" <[EMAIL PROTECTED]>
>Date: Tue, 30 May 2000 09:25:51 -0700
>X-Message-Number: 19
>> From: Dave Lippincott [mailto:[EMAIL PROTECTED]]
>> Make sure the new text length isn't longer than the original
>> length of the control set in the constructor.
>> Non-field controls don't dynamically resize their text.
>But that's not an issue with CtlSetLabel because it just keeps a copy of the
.passed string pointer, instead of copying the string into the control's
>>internal buffer.
-slj-
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/