> > My app sets the text associated with a label using 
> CtlSetLabel().  It
> works
> > fine on OS < 4.0.  However, on 4.0 I get the following 
> error message from
> > the emulator: "...Control.c Line 543, Not a control object."
...
> trying to change the text of a label object.  A label object isn't a
> control.  Use FrmCopyLabel.

Yes, but FrmCopyLabel and CtlSetLabel behave very differently. The latter
just passes a pointer, while the former makes a copy of the string and
requires enough space in the label resource. Unfortunately, there's no
FrmSetLabel call. (Interestingly, there's a forgotten sysTrapFrmSetLabel in
coretraps.h, but no prototype and no docs)

Sometimes you do not want to bloat your app size by defining the label with
the maximum length in the resource file. And if you do, you have to make
sure the overlong label fits completely on the screen or you'll get other
warnings on the latest ROM/POSE.

Kind regards,
Andreas Linke


-- 
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