> From: [EMAIL PROTECTED]
>
> case MainExecuteButton:
>   frmP=FrmGetActiveForm();
>   fld=( FieldPtr ) GetObjectPtr (MainCommandField);
>   Commandl=FldGetTextPtr (fld);
>   if(Commandl=="l")
>     SndPlaySystemSound(sndAlarm);
>   break;
>

Have you read a basic book on the C programming language?  FldGetTextPtr
returns a pointer.  A pointer is not likely to ever be equal to "l".  You
need to use something to compare two strings.  In standard C, that would be
strcmp() or one of the related functions.  When programming for a Palm OS
device, use the Palm function StrCompare().  For example,

  if ( 0 == StrCompare(Command1, "l") )
    SndPlay...

Now for the strictly Palm portion of this discussion:

When you handle a button press, you have to tell the OS that you have done
so.  Therefore, before the break, you need to insert
  handled = true;
or
  return true;


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to