Rewand
28 Jun 2007, 1:28 PM
I've got a TextField and I want to trigger an action on every keysroke. I can register blure, change, or specialkey events but I don't see anything that will fire on every keystroke.
I tried to make a Keymap with the following
searchField = new Ext.form.TextField({
maxLength: 40,
grow: false,
selectOnFocus: true
});
new Ext.KeyMap(searchField,{
key:"abcdefg0123456789",
fn:function(){
alert("in keymap");
}
});
But this renders an error in firefox when the page loads.
this.el has no properties.
this.el.on(this.eventName, this.keyDownDelegate);
This was hit on line 6617 of ext-all-debug.js (version 1.0.1)
Eventually I want queue DelayedTask calls to this event handler so that as the user types I can update/highlight elements that match the contents of the textField but I can't even capture the keysroke events.
What am I doing wrong?
I tried to make a Keymap with the following
searchField = new Ext.form.TextField({
maxLength: 40,
grow: false,
selectOnFocus: true
});
new Ext.KeyMap(searchField,{
key:"abcdefg0123456789",
fn:function(){
alert("in keymap");
}
});
But this renders an error in firefox when the page loads.
this.el has no properties.
this.el.on(this.eventName, this.keyDownDelegate);
This was hit on line 6617 of ext-all-debug.js (version 1.0.1)
Eventually I want queue DelayedTask calls to this event handler so that as the user types I can update/highlight elements that match the contents of the textField but I can't even capture the keysroke events.
What am I doing wrong?