<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    layout="absolute"
    preinitialize="_onPreInit()"
    addedToStage="dispatchEvent(new Event('configureIOC', true));"
    width="100%" height="100%" 
    xmlns:views="com.sitronnier.parsley2.views.*" 
    xmlns:logging="com.soenkerohde.logging.*"
    viewSourceURL="blogposts/srcview/Parsley2Flex/srcview/index.html"
    >
    
    <mx:Script>
        <![CDATA[
            import mx.logging.LogEventLevel;
            import com.sitronnier.parsley2.events.FlowEvent;
            import mx.logging.Log;
            import mx.logging.targets.TraceTarget;
            import org.spicefactory.parsley.flex.FlexContextBuilder;
            
            protected function _onPreInit():void
            {
                /*
                // LOGGERS & MINIMUM LEVEL (using Soenke Rohde SOS target, see below and http://soenkerohde.com/2008/08/sos-logging-target/)
                var logTarget:TraceTarget = new TraceTarget();
                logTarget.includeCategory = true;
                logTarget.includeLevel = true;
                logTarget.level = LogEventLevel.DEBUG;
                logTarget.filters = ["com.sitronnier.parsley2.*"];
                Log.addTarget(logTarget);
                */
                
                // INITIALIZE PARSLEY
                FlexContextBuilder.build(Beans);
            }
            
        ]]>
    </mx:Script>
    
    
    <!-- MAIN VIEW -->
    <views:Main />
    
    
    <!-- USING SOENKE ROHDE SOS TARGET, SEE HTTP://SOENKEROHDE.COM/2008/08/SOS-LOGGING-TARGET/ -->
    <logging:SOSLoggingTarget
        fieldSeparator="-> "
        includeCategory="true"
        includeLevel="true"
        includeTime="false" 
        />

    
</mx:Application>