Use
if( 0 != StrCmp( Command, "1" ) )
Instead
I think that the PalmOS FAQ should add a FAQ on "Handling stings on C
language".
Best Regards
Alberto Gaona
-----Mensaje original-----
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]En nombre de
[EMAIL PROTECTED]
Enviado el: Viernes, 13 de Julio de 2001 04:00 p.m.
Para: Palm Developer Forum
Asunto: Getting text.
Hey! I am having a little trouble getting the text of a field. This
is my code.
frmP is a form pointer,
fld is a FieldPtr
Commandl is a char pointer.
My goal is to make it so that when the user types in l and presses the
execute button that the palm will sound off the alarm. Right now I don't get
any errors but noting happens when I pres the command button and type in l
in the text field. Please help! Thanks!
GOD Bless!!!
case MainExecuteButton:
frmP=FrmGetActiveForm();
fld=( FieldPtr ) GetObjectPtr
(MainCommandField);
Commandl=FldGetTextPtr (fld);
if(Commandl=="l") SndPlaySystemSound(sndAlarm);
break;
--
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/