Now I recall something while testing on Palm OS 5.0 at last year's
PalmSource labs. CtlSetLabel() did flake out on OS 5.0, although it worked
fine on previous versions of the OS. I was told I should use FrmCopyLabel()
instead.
Michael Yam
www.ytechnology.com
Viraj Chatterjee <[EMAIL PROTECTED]> wrote in message
news:58139@palm-dev-forum...
>
> I quote from the Palm OS Companion pdf, Pg. 107 that came with the 3.5 SDK
>
> [snip...]
> You don't interact with a label as a programmatic entity; however,
> you can use Form and Control API to create new labels or to change
> labels dynamically.
> [snip...]
>
> So, it doesn't appear to work correctly, it is designed to work correctly.
> However, I do agree that since a separate function (FrmCopyLabel) is given
> for this very purpose, using that would be a good programming practice.
But,
> I don't think it is incorrect to use the other (CtlSetLabel) and/or the
> other method just works somehow and is not guaranteed to do so...
>
> -vc
>
> ----- Original Message -----
> From: "Mark Smith" <[EMAIL PROTECTED]>
> Subject: Re: Labels
>
>
> > "Viraj Chatterjee" <[EMAIL PROTECTED]> wrote:
> > >Use CtlSetLabel...
> > >eg.:
> > > CtlSetLabel(((ControlPtr)FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP,
> > >LabelObjID))), newstr);
> >
> > If it's really a label object, I don't believe this is correct,
> > even though it appeared to work in earlier version so of the OS.
> > CtlSetLabel sets the text associated with a control such as a
> > pushbutton or checkbox. But labels themselves aren't controls,
> > they're lighter weight objects. You have to use FrmCopyLabel
> > instead, and make sure the new label length isn't longer than
> > the length as defined in the original resource.
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/