I have recently changed mats as the framework for Flex. Although there are some issues going on, I want to know how to transmit the events of classes generated through the method invobar tag.
& lt; ResultHandlers & gt; & Lt; Method invocor generator = "{login sign}" method = "setcant user" argument = "{[resultObject]}" />
And in class I would like an event dispatch
public function setCurrentUser. (CalUser: Object): void {if (calUser! = Null) as {Model.instance.currentUser = calUser CalUser; LoadOnlineCalendar (Model.instance.currentUser); }} Public function loadOnlineCalendars (calUser: CalUser): void {(var i: int = 0; i & LT; calUser.calConnectors.length; i ++) {// logic here dispatchEvent (new CalConnectorEvent (CalConnector, CalConnectorEvent Form calUser.calConnectors. LOAD_ONLINE_CALENDAR_EVENT, true)); }}
The problem is that I can not be able to capture the event in the event map or even in the application root.
If someone has any experience with a friend, I appreciate some indicators. Maybe I'm doing all this wrong I just want to get results from the server - look at the results and contact the server again on the basis of the result. Should be very simple.
Event Map:
& lt; Results Handlers & gt; & Lt; Method invocor generator = "{login sign}" method = "setcant user" argument = "{[resultObject]}" /> & Lt; ServiceResponseAnnouncer Type = "Result" /> & Lt; / ResultHandlers & gt; & Lt; FaultHandlers & gt; & Lt; ServiceResponseAnnouncer Type = "Defect" /> & Lt; / FaultHandlers & gt; & Lt; / RemoteObjectInvoker & gt;
By the way This is usually done in the object inventor needle of the event map: inner The class is obviously supposed to have a public property called If the object In this example, Event Despatcher is injected as Constructor Logic, but you can only use
& lt; MethodInvoker generator = "{MyClass}" method = "someMethod" arguments = "{[a, b]}"> gt; & Lt; Property Dispatcher = "{scope.dispatcher}" /> & Lt; / MethodInvoker & gt; The
property
tag is being created on the object by the property MethodInvoker
, and the property is guaranteed to be set before the method is applied. dispatcher
(or the name you like) to work on it. Events that you want to hear in event map call dispatcher.dispatchEvent (...)
, to dispatch. made by MethodInvoker
will be used more than once, if it is a manager, said the common parlance it ObjectBuilder
Use To create, this is an event handler block which is FlexEvent.INITIALIZE
:
Properties
tags for MethodInvoker
Can do with
Comments
Post a Comment