In your code, call FldHandleEvent then do the FldGetTextLength after it
returns. Mare sure you always return true or else FldHandleEvent will be
called again after your form event handler.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Luca
Sent: Friday, February 18, 2000 8:09
To: Palm Developer Forum
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