[EMAIL PROTECTED] wrote:
>Thank you for clarifying.  After spending almost an hour studying the
>comments under CtlGetLabel, I have a better understanding of setting and
>getting label text from the Selector control.  Since CtlSetLabel() uses
>pointer to a string, this pointer should persists during the life of the
>Form object.  Hence, use STATIC variable for the pointer.

The memory pointed to would persist even if the variable wasn't
static, because it's been allocated from the heap.  Saving it in
a static variable keeps a reference around so you can free it later
when the form is destroyed.  I don't think that's even necessary
though, since you can just call CtlGetLabel() to get back the pointer.

-- 
    -M-                                              [EMAIL PROTECTED]

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

Reply via email to