incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject Re: Actionscript workers and async locking?
Date Mon, 26 Mar 2012 04:29:20 GMT
Hi,

> It sounds like you really can't do much about the timing of your bootstrap if one call
is dependent upon the result of your prior call. Even if you had threads available, you'd
be waiting the same amount of time.

Event maps in the Mate framework I find quite useful for this sort of issue (http://mate.asfusion.com/).

Here's a code snippet (from an old Flex3 project I had lying about so might be a little out
of date) that give you a feel for event maps in Mate:

	<EventHandlers type="{LoginEvent.ATTEMPT_USERLOGIN}">
		<RemoteObjectInvoker instance="{service.loginService}" method="getLoggedOnUser">
			<resultHandlers>
				<MethodInvoker generator="{SelfRegWizard}" method="loginAccountStatus" arguments="{resultObject}"
/>
			</resultHandlers>
			<faultHandlers>
				<EventAnnouncer generator="{ReportEvent}" constructorArguments="{[ReportEvent.WARNING,
'loginFailed', 'Login Failed']}" />			
			</faultHandlers>
		</RemoteObjectInvoker>
	</EventHandlers>

	<EventHandlers type="{LoginEvent.SUCCESSFUL_LOGIN}">
		<RemoteObjectInvoker instance="{service.loginService}" method="getLoggedOnUser"> 

			<resultHandlers>
				<PropertySetter generator="{SelfRegWizard}" sourceKey="{selfRegModel.newAccount}" targetKey="newAccount"/>
			</resultHandlers>
		</RemoteObjectInvoker>
	</EventHandlers>

Thanks,
Justin
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message