I'm new to Adobe Flex.
Aim: I have a custom component named IOField based on TextArea component. Inside the IOField, how to write code that clears the textarea when the user press enter key.
I have the main application this component is added as <comp: IOField/> with xml namespace :comp
Is there any thing in flex like fl.events.ComponentEvent that's present in flash?
I'm trying to do things in OOP way with consideration to performance also.
If you extended the TextArea Component then you can use a small piece of AS3 to get the Keypress and delete the content of the textfield. something like this
private function changeEvent(e:KeyboardEvent)
if(e.keyCode == Keyboard.ENTER)
myTextArea.text = "";
<mx:TextArea id="myTextArea" keyDown="changeEvent(event)" text=""/>