Typically, a textfield's contents are updated in between onkeydown and onkeyup.

On Jan 5, 2006, at 7:22 PM, Oliver Steele wrote:

How can I get the content of a text field as soon as a key is pressed?

If I do something like the following:
  <canvas>
    <edittext>
<method event="onkeydown">Debug.write('keydown', this.getText ())</method>
    </edittext>
  </canvas>
then what is printed in the debugger omits the effect of the current key --- when I press 'a', the text field shows 'a' and the empty string is printed; then when I press 'b', the text field shows 'ab' and 'a' is printed. And the same with event="onkeyup".

Is there an elegant solution for this, or does one need to do something gnarly such as set a timer when a key is pressed in order to read the content on the next frame?
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user


_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to