Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<swiz:BeanProvider xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:swiz="http://swiz.swizframework.org">
<mx:Script>
<![CDATA[
import mx.core.FlexGlobals;
]]>
</mx:Script>
<swiz:ChannelSetHelper id="channelSet"
@swiz
swiz / IAutonomousChainStep.as
Created May 23, 2010 01:47
Chain API examples
public interface IAutonomousChainStep extends IChainStep
{
function doProceed():void;
}
@swiz
swiz / CompositeChain.as
Created May 19, 2010 01:42
10 minutes + Swiz Chaining API = Rudimentary functional tester
package chains
{
import org.swizframework.utils.chain.AbstractChain;
import org.swizframework.utils.chain.IAutonomousChainStep;
import org.swizframework.utils.chain.IChain;
public class CompositeChain extends AbstractChain implements IChain
{
public function doProceed():void
{
@swiz
swiz / gist:370666
Created April 19, 2010 01:39
Code samples for Configuration wiki page
<swiz:Swiz>
<swiz:beanProviders>
<local:MyBeans />
</swiz:beanProviders>
<swiz:config>
<swiz:SwizConfig
setUpEventType="{ Event.ADDED_TO_STAGE }"
setUpEventPhase="{ EventPhase.CAPTURING_PHASE }"
setUpEventPriority="50"
@swiz
swiz / ServiceHelper::executeServiceCall().as
Created April 4, 2010 00:57
Code samples for Service Layer wiki page
[Inject( "userService" )]
public var ro:RemoteObject;
[Inject]
public var sh:ServiceHelper;
public function fetchUserRoles( user:User ):void
{
sh.executeServiceCall( ro.fetchUserRoles( user.id ), fetchUserRoles_result, fetchUserRoles_fault, [ user ] );
}
@swiz
swiz / mediate_class_constant.as
Created March 28, 2010 19:50
Code samples for Event Handling wiki page.
[Mediate( event="com.foo.events.UserEvent.ADD_USER" )]
public function mediateAddUserEvent( event:UserEvent ):void
{
// do stuff
}
@swiz
swiz / class_level_metadata.as
Created March 26, 2010 02:38
Code samples for Dependency Injection wiki page
[Inject( source="userModel.currentMode", destination="modeViewStack.selectedIndex" )]