case keyDownEvent:
    pOurField = (FieldPtr) GetObjectPtr(OurEditField);
    handled = FldHandleEvent(pOurField,eventP);
    if(FieldDirty(pOurField);
        {
            // Do whatever we need to see that this field has changed
        }
    break;

return handled;

if you have more than one field to track you will need to also trap on
fldEnterEvent and keep track of which field you are entering text into.

-----Original Message-----
From: Luca <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Date: Friday, February 18, 2000 10:06 AM
Subject: intercepting a keyDownEvent


>I'm trying to dynamically keep track of the length of text in a field.  My
>code is set up this way:
>FormEventHandler()
>{
>     switch(eventType)
>            case keyDownEvent:
>               Word n =  FldGetTextLength(fldPtr);
>                do something with n
>}
>
>Each time a character in input a keyDownEvent is intercepted by this
>mechanism.  The problem is that the event reaches my code before it reaches
>the field, so n gets the length of the text and then the text is changed
>(Therefore n actually gets the length before the last character was input).
>Is there any way to let the text field intercept the event before it gets
to
>my form's event handler?
>
>Thanks in advance
>Luca
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to