Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
Contributor
satishmukku
Posts: 42
Registered: ‎08-30-2012
My Carrier: Aircel
Accepted Solution

My KeyBoard actionlistener event is not working correctly

Hi everyOne,

 

In my app iam generating the output while the user is typing the data in text input field, for that iam adding actionlistener to keyboard,

the problem is i did nt get the data while typing i need to wait for some time or need to press enter or esp keys

 

wts the prbelm can any one tell me. here is my code

searchInput.prompt = "Search...";		searchInput.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);

private function keyDownHandler(event : KeyboardEvent) : void{
dao.getDatabyKeyword(searchInput.text,onSuccessfullyRetrived);
}
//here getdatabykeyword is my database method and on succesfullyretrived is display data method 
no problems with these two methods i tested those.

 

Please use plain text.
Developer
jtegen
Posts: 6,145
Registered: ‎10-27-2010
My Carrier: AT&T

Re: My KeyBoard actionlistener event is not working correctly

Try listening to Event.CHANGE, instead of the keyboard event for the text input control. Standard TextInput responds to text changes. This assumes that the QNX TextInput was implemented this way and you are using that control.

If you add a trace(...) to your callback function, are you saying that it is not being triggered with key down events?
Please use plain text.
Contributor
satishmukku
Posts: 42
Registered: ‎08-30-2012
My Carrier: Aircel

Re: My KeyBoard actionlistener event is not working correctly

Thank you very much sir,
event.change is working according to my need
thanks a lot
Please use plain text.