| Package | com.asfusion.mate.actionLists |
| Class | public class EventHandlers |
| Inheritance | EventHandlers AbstractHandlers flash.events.EventDispatcher |
| Subclasses | ServiceHandlers |
EventHandlers defined in the EventMap will run whenever an event of the type specified in the EventHandlers's "type" argument is dispatched.
Note that in order for the EventMap to be able to listen for the given event,
this event must have its bubbling setting as true and be dispatched from an object that has Application as its root ancestor,
or the event must be dispatched by a Mate Dispatcher (such is the case when dispatching events from a PopUp window).
<EventHandlers type="myEventType">
... here what you want to happen when this event is dispatched...
</EventHandlers>
| Property | Defined by | ||
|---|---|---|---|
![]() | actions : Array
An array of Actions (IAction) contained in this IActionList.
| AbstractHandlers | |
![]() | debug : Boolean
Whether to show debugging information for this IActionList.
| AbstractHandlers | |
![]() | dispatcherType : String
String that defines whether the dispatcher used by this tag is
global or
inherit. | AbstractHandlers | |
| priority : int
(default = 0) — The priority level of the
EventHandlers. | EventHandlers | ||
![]() | scope : IScope
Returns the current scope for this IActionList
| AbstractHandlers | |
| type : String
The event type that, when dispatched, should trigger the handlers to run.
| EventHandlers | ||
| useCapture : Boolean
(default = false) — Determines whether the listener works in the capture phase or the target and bubbling phases.
| EventHandlers | ||
| useWeakReference : Boolean
(default = true) — Determines whether the reference to the listener is strong or weak.
| EventHandlers | ||
| Property | Defined by | ||
|---|---|---|---|
![]() | currentDispatcher : IEventDispatcher | AbstractHandlers | |
![]() | dispatcherTypeChanged : Boolean
Flag indicating whether the
dispatcherType has been changed and needs invalidation. | AbstractHandlers | |
![]() | document : Object
Internal storage for the document object.
| AbstractHandlers | |
![]() | inheritedScope : IScope
Parent scope that is passed to the IActionList when it is a sub-ActionList.
| AbstractHandlers | |
![]() | manager : IMateManager
Internal instance of
IMateManager. | AbstractHandlers | |
![]() | map : IEventMap
Internal instance of
IEventMap. | AbstractHandlers | |
| registered : Boolean
Flag indicating if this
EventHandlers tag is registered to listen to an event or not. | EventHandlers | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor
| EventHandlers | ||
|
clearReferences():void
Unregister as a listener and prepare to be garbage collected
| EventHandlers | ||
|
errorString():String
Retuns an error String to be used by the debugger.
| EventHandlers | ||
![]() |
getDocument():Object
A reference to the document object associated with this IActionList.
| AbstractHandlers | |
![]() |
getGroupId():int
Method to get the group id.
| AbstractHandlers | |
![]() |
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the IActionList is set up using a tag.
| AbstractHandlers | |
![]() |
invalidateProperties():void
Marks a component so that its
commitProperties method gets called during a later screen update. | AbstractHandlers | |
|
setDispatcher(value:IEventDispatcher, local:Boolean = true):void
A method that allows setting the dispatcher
that this IActionList will use to register to events.
| EventHandlers | ||
![]() |
setGroupId(id:int):void
Method to set the group id.
| AbstractHandlers | |
![]() |
setInheritedScope(inheritedScope:IScope):void
You can pass the parent scope to this IActionList to copy the inherited values.
| AbstractHandlers | |
![]() |
validateNow():void
Validate and update the properties of this object, if necessary.
| AbstractHandlers | |
| Method | Defined by | ||
|---|---|---|---|
|
commitProperties():void
Processes the properties set on the component.
| EventHandlers | ||
![]() |
dispatcherChangeHandler(event:DispatcherEvent):void
A handler for the mate dispatcher changed.
| AbstractHandlers | |
|
fireEvent(event:Event):void
Called by the dispacher when the event gets triggered.
| EventHandlers | ||
![]() |
runSequence(scope:IScope, actionList:Array):void
Goes over all the listeners (
IActions)
and calls the method trigger on them, passing the scope as an argument. | AbstractHandlers | |
![]() |
Set the scope on this IActionList.
| AbstractHandlers | |
|
unregister(oldType:String, oldDispatcher:IEventDispatcher, oldCapture:Boolean):void
Un-register as a listener of the event type provided.
| EventHandlers | ||
| priority | property |
priority:int [read-write]
(default = 0) — The priority level of the EventHandlers.
The higher the number, the higher the priority. All EventHandlers with priority n are
processed before EventHandlers of priority n-1.
If two or more EventHandlers share the same priority, they are processed
in the order in which they were added. The default priority is 0.
The default value is 0.
public function get priority():int
public function set priority(value:int):void
| registered | property |
protected var registered:Boolean
Flag indicating if this EventHandlers tag is registered to listen to an event or not.
| type | property |
type:String [read-write]The event type that, when dispatched, should trigger the handlers to run. It should match the type specified in the event when created. All events extending from flash.events.Event have a "type" property. The type is case-sensitive.
The default value is null.
public function get type():String
public function set type(value:String):void
| useCapture | property |
useCapture:Boolean [read-write](default = false) — Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture is set to true, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture is false, the listener processes the event only during the target or bubbling phase.
The default value is false.
public function get useCapture():Boolean
public function set useCapture(value:Boolean):void
| useWeakReference | property |
useWeakReference:Boolean [read-write](default = true) — Determines whether the reference to the listener is strong or weak. A strong reference (the default) prevents your listener from being garbage-collected. A weak reference does not. When using modules, it is recomended to use weak references to garbage-collect unused modules
The default value is true.
public function get useWeakReference():Boolean
public function set useWeakReference(value:Boolean):void
| EventHandlers | () | constructor |
public function EventHandlers()Constructor
| clearReferences | () | method |
public override function clearReferences():voidUnregister as a listener and prepare to be garbage collected
| commitProperties | () | method |
protected override function commitProperties():voidProcesses the properties set on the component.
| errorString | () | method |
public override function errorString():StringRetuns an error String to be used by the debugger.
ReturnsString |
| fireEvent | () | method |
protected function fireEvent(event:Event):voidCalled by the dispacher when the event gets triggered. This method creates a scope and then runs the sequence.
Parametersevent:Event |
| setDispatcher | () | method |
public override function setDispatcher(value:IEventDispatcher, local:Boolean = true):voidA method that allows setting the dispatcher that this IActionList will use to register to events.
Parametersvalue:IEventDispatcher |
|
local:Boolean (default = true) |
| unregister | () | method |
protected function unregister(oldType:String, oldDispatcher:IEventDispatcher, oldCapture:Boolean):voidUn-register as a listener of the event type provided.
ParametersoldType:String |
|
oldDispatcher:IEventDispatcher |
|
oldCapture:Boolean |