(Flex Data Visualization only)
Packagemx.automation.delegates
Classpublic class TextFieldAutomationHelper
InheritanceTextFieldAutomationHelper Inheritance Object

Utility class that facilitates replay of text input and selection.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
Constructor.
TextFieldAutomationHelper
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
recordAutomatableEvent(interaction:Event, cacheable:Boolean = false):void
Records the user interaction with the text control.
TextFieldAutomationHelper
  
Replays TypeTextEvents and TypeEvents.
TextFieldAutomationHelper
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Constructor Detail
TextFieldAutomationHelper()Constructor
public function TextFieldAutomationHelper(owner:IEventDispatcher, replayer:IAutomationObject, textField:IUITextField)

Constructor.

Parameters
owner:IEventDispatcher
 
replayer:IAutomationObject
 
textField:IUITextField
Method Detail
recordAutomatableEvent()method
public function recordAutomatableEvent(interaction:Event, cacheable:Boolean = false):void

Records the user interaction with the text control.

Parameters

interaction:Event
 
cacheable:Boolean (default = false)

replayAutomatableEvent()method 
public function replayAutomatableEvent(event:Event):Boolean

Replays TypeTextEvents and TypeEvents. TypeTextEvents are replayed by calling replaceText on the underlying text field. TypeEvents are replayed depending on the character typed. Both also dispatch the origin keystrokes. This is necessary to mimic the original behavior, in case any components are listening to keystroke events (for example, DataGrid listens to itemRenderer events, or if a custom component is trying to do key masking). Ideally, the code would just dispatch the original keystrokes, but the Flash Player TextField ignores the events we are sending it.

Parameters

event:Event — Event to replay.

Returns
Boolean — If true, replay the event.