The problem here is that it doesn't change even the first time.
I can't change the content of TempCode, in any way.
Say I put 1234 as the definition value of TempCode
char TempCode[5] = "1234";

I can never change that value....
It this and what ever I do It doesn't change.
More... the CurChar variable
if I print it with an alert
FrmCustomAlert(myAlert, ""+CurChar, NULL, NULL);

it print "" nothing...

---------

Ok, say I want to have a string with 1234 in it
and replace it's content with the caption of the button I press
how would you do that...( without having to extract the caption from the
button,
I already know, what's on the button)

Stuart Nicholson wrote:

> I think you'll find the last if statement is changing the address of the
> TempCode string (strings are just addresses in C) to point to the static
> "0000\0" string you define. Once you've done this the first time I think
> you'll find you can't change the string contents any more (actually I'm
> surprised the Palm Emulator doesn't complain when you try to).
>
> I'd say instead of this:
>
> if( // the '#' button is pressed )
> {
>     *TempCode = "0000\0";
>     CurChar = 0;
> }
>
> You should do something like this:
>
> if( // the '#' button is pressed )
> {
>     StrCopy( TempCode, "0000\0" );
>     CurChar = 0;
> }
>
> But then I could be wrong ;) hope that helps!
>
> Stuart Nicholson
> Programmer
> Firepad, Inc.
>



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to