From: "Matt Becker" <[EMAIL PROTECTED]>
Subject: Setting Text to a field
> CharPtr ptemp = "";
> CharPtr ptext = "";
> ptext = StrIToA(ptemp, MyArmy.NumArcher);
> SetTextToField(ReviewArmyArcherField, ptext);
> ptext = StrIToA(ptemp, MyArmy.NumLtFoot); <--- crashes here with a
(&#@ error (serious, looks like gibberish)
> SetTextToField(ReviewArmyLtFootField, ptext );
Shouldn't you allocate some space for ptemp before calling StrIToA? E.g.,
Char ptemp[10];
StrIToA(ptemp, MyArmy.NumArcher);
The way you've declared ptemp only allocates 1 byte for the \0 .
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/