your variable 's' must exist for the life of the trigger if you're using
CtlSetLabel. Also make sure the character length of 's' does not exceed the
length of the original label (plus NULL).
----- Original Message -----
From: "Matt Mason" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, February 19, 2001 1:40 PM
Subject: Trigger label changes bombing
> When I change the label on a popup trigger with this:
> {
> CharPtr s = MemPtrNew(sizeof(char[MAX_ITEM_PRICE_SIZE]));
> MemSet(s,MAX_ITEM_PRICE_SIZE,0);
> s = StrIToA(s,qty);
> CtlSetLabel(GetObjectPtr(ItemEditQtyPopTrigger),s);
> MemPtrFree(s);
> }
> and then try to use the popup trigger on the form, I get an error reading
> from an unallocated chunk.
>
> What am I doing wrong?
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/