Possibly because (assuming from your variable name), SelectorTriggerID is
not a label control. Its a popup trigger control.
Try instead:
void UpdateTrigger(Word FieldNumber,char *NewString)
{
ControlPtr CtlPtr;
CharPtr Buf;
CtlPtr = (ControlPtr)GetObjectPtr(FieldNumber);
Buf = CtlGetLabel(CtlPtr);
StrCopy(Buf,NewString);
CtlSetLabel(CtlPtr,Buf);
CtlDrawControl(CtlPtr);
}
----- Original Message -----
From: "Alexandre Kazantsev" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, August 09, 2002 4:23 PM
Subject: Not a label object
> I've just started to test my application with debug ROMs (OS 4.0, 4.1) and
> getting "Not a label object" fatal error. The following function call
fails
> to execute:
> FrmCopyLabel(frmP, SelectorTriggerID, "str").
> It executed fine with non-debug ROMs.
>
> What function should I use to fill a selector trigger label
> programmatically?
>
> Thanks in advance.
>
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/