First of all, your operator precedence is messed up -- read up on the
precedence of && vs || and add more parentheses to make it explicit what
conditions you wanted to test.

Second, the Find button is not a hard key.

In other words, it works on non-TT devices because you have a bug on non-TT
devices -- here is how the "isMemoFindKey" assignment actually works, which
is definitely not what you wanted.  Notice that it tests
"event.data.keyDown.chr == vchrFind" for all events, not just keyDownEvent.

isMemoFindKey =
    (
        (event.eType == keyDownEvent) &&
        (TxtCharIsHardKey(event.data.keyDown.modifiers,
                event.data.keyDown.chr)) &&
        (event.data.keyDown.chr == vchrHard4)
    )
    ||
    (
        event.data.keyDown.chr == vchrFind
    )



"Tenchi-Man" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hi,
> I cant disable the Find button on Tungsten T.  But it works on other
devices
> with no 5way navigation!!! Really dont know why.......... can you help?
THX
>
> My code:
>
> gFiveWayErr = FtrGet(navFtrCreator, navFtrVersion, &version);
>
>   /* change timeout if you need periodic nilEvents */
>   EvtGetEvent(&event, evtWaitForever);
>
>   if (gFiveWayErr)
>   {
>    isMemoFindKey = (event.eType == keyDownEvent)
>      && (TxtCharIsHardKey(event.data.keyDown.modifiers,
>        event.data.keyDown.chr))
>      && (event.data.keyDown.chr == vchrHard4) || (event.data.keyDown.chr
==
> vchrFind);
>
>      if (isMemoFindKey || ! SysHandleEvent(&event))
>    {
>     if (! MenuHandleEvent(0, &event, &error))
>     {
>      if (! AppHandleEvent(&event))
>      {
>       FrmDispatchEvent(&event);
>      }
>     }
>    }
>   }
>   else
>   {
>    isFindKey = (event.eType == keyDownEvent)
>      && (TxtCharIsHardKey(event.data.keyDown.modifiers,
>        event.data.keyDown.chr))
>      && (event.data.keyDown.chr == vchrFind);
>
>    if (isFindKey || ! SysHandleEvent(&event))
>    {
>     if (! MenuHandleEvent(0, &event, &error))
>     {
>      if (! AppHandleEvent(&event))
>      {
>       FrmDispatchEvent(&event);
>      }
>     }
>    }
>   }
>
>
>
>



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

Reply via email to