Transferred from the Adobe Open Source Subversion Repository

Revision: 6018
Author:   pfarland@adobe.com
Date:     2009-04-08T15:36:36.925077Z

Log Message:
-----------
API changes from PARB review of Advanced CSS additions.

Changes include:
- Fold IStyleManager3 back into IStyleManager2
- Remove CSSSelectorKind enum as it is not needed.
- Update CSSStyleDeclaration constructor to accept either a CSSSelector or legacy String selector.
- Update CSSConditionKind enum to use Strings
- Revert concept of StyleManager.addCSSStyleDeclaration() so that we continue to use the Flex 3 restriction of one CSSStyleDeclaration per unique selector String.
- Minor renames for lower level APIs such as IAdvancedStyleClient's isPseudoSelectorMatch() -> matchesCSSState(), and isTypeSelectorMatch)() -> matchesCSSType()
- Update ASDoc comment version info for APIs that were really added in Gumbo
- Add compiler warning for unqualified type selectors (e.g. when a type selector probably needs a namespace prefix).
- Add compiler warning for unresolved qualified type selector (e.g. when a type is probably missing from a manifest).

QE: I have an update for the mustella tests of programmatic creation of CSSStyleDeclaration
Doc: Yes, if we can do an ASDoc review of CSS classes in the framework it would be much appreciated.
Checkintests: Pass
mustella StyleManager/AdvancedCSS: Pass
Reviewer: Glenn

Modified Paths:
--------------
<path kind="dir" action="D">/flex/sdk/trunk/modules/fxgutils/src/java/flash</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager3.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleSelector.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelectorKind.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/UnqualifiedTypeSelector.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleCondition.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/UnresolvedQualifiedTypeSelector.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSConditionKind.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1282704 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -179,9 +179,10 @@
     //--------------------------------------------------------------------------

     /**
-     *  @private
+     *  The state to be used when matching CSS pseudo-selectors. This override
+     *  returns the current skin state instead of the component state.
      */
-    override public function get pseudoSelectorState():String
+    override protected function get currentCSSState():String
     {
         return getCurrentSkinState();
     }
@@ -195,9 +196,9 @@
     /**
      *  @private
      */
-    override public function isPseudoSelectorMatch(pseudoState:String):Boolean
-    {
-        return getCurrentSkinState() == pseudoState || currentState == pseudoState;
+    override public function matchesCSSState(cssState:String):Boolean
+    {
+        return getCurrentSkinState() == cssState || currentState == cssState;
     }

     /**
@@ -247,19 +248,19 @@
     override protected function commitProperties():void
     {
         super.commitProperties();
-
+
         if (skinChanged)
         {
             skinChanged = false;
             validateSkinChange();
         }
-
+
         if (skinStateIsDirty)
         {
             // This component must first be updated to the pending state as the
             // skin inherits styles from this component.
             var pendingState:String = getCurrentSkinState();
-            applyStateStyles(skin.currentState, pendingState, false);
+            stateChanged(skin.currentState, pendingState, false);
             skin.currentState = pendingState;
             skinStateIsDirty = false;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18546
Author:   rfrishbe@adobe.com
Date:     2010-11-11T21:50:22.993859Z

Log Message:
-----------
Fixing up a bug with dynamic skin part handling where the skin would change, we'd try to remove all dynamic elements from the old skin, but we wouldn't successfully do that.

QE notes:
Doc notes:
Bugs: SDK-28032
Reviewer: Eric Day
Tests run: checkintests, mustella SkinnableComponent
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1282753 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -767,7 +767,7 @@
                     else
                     {
                         var len:int = numDynamicParts(id);
-                        for (var j:int = 0; j < len; j++)
+                        for (var j:int = len - 1; j >= 0; j--)
                             removeDynamicPartInstance(id, getDynamicPartAt(id, j));
                     }
                 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5545
Author:   jimurphy@adobe.com
Date:     2009-03-25T19:00:52.330680Z

Log Message:
-----------
1st pass of rename according to the spec http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix

Flex now requires CSS Style declarations to declare @namespace rules and disambiguate between halo and spark components using CSS 3 namespace prefixes on type selectors. At compile time, this namespace information will be used to map type names to qualified ActionScript class names. At runtime, type selectors are matched on qualified ActionScript class name (for example mx.controls.Button rather than just Button). Flex 3 applications must be compiled with -compatibility-version=3.0.0 to get unqualified CSS type selector behavior.

QE: Yes, this build may help in updating test cases to use the new namespaces and class names.
Dev: Not yet
Doc: Not yet

Modified Paths:
--------------
748 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1284135 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/effects/interpolation/MultiValueInterpolator.as
+++ frameworks/projects/spark/src/spark/effects/interpolation/MultiValueInterpolator.as
@@ -8,7 +8,7 @@
 //  in accordance with the terms of the license agreement accompanying it.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package mx.effects.interpolation
+package spark.effects.interpolation
 {

 import mx.resources.IResourceManager;


Transferred from the Adobe Open Source Subversion Repository

Revision: 13035
Author:   hneelu@adobe.com
Date:     2009-12-17T07:35:16.160630Z

Log Message:
-----------
Updating automation project to latest p4 changes.

Modified Paths:
--------------
228 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1251637 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/automation/src/mx/automation/tabularData/ContainerTabularData.as
+++ frameworks/projects/automation/src/mx/automation/tabularData/ContainerTabularData.as
@@ -101,8 +101,7 @@
 			var visibleChildren:int = 0;
 			// code modified to avoid the usage of numAutomationChildren and
 			// getAutomationChildAt in a loop
-			//var childList:Array  = containerDelegate.getAutomationChildren();
-			var childList:Array  =  Automation.automationManager2.getAutomationChildrenArray(containerDelegate);
+			var childList:Array  = containerDelegate.getAutomationChildren();

 			var n:int = childList?childList.length:0;
 			//for (var i:int = 0; i < containerDelegate.numAutomationChildren; ++i)
@@ -156,8 +155,7 @@
 			var k:int = 0;
 			// code modified to avoid the usage of numAutomationChildren and
 			// getAutomationChildAt in a loop
-			//var childList:Array  = containerDelegate.getAutomationChildren();
-			var childList:Array  =  Automation.automationManager2.getAutomationChildrenArray(containerDelegate);
+			var childList:Array  = containerDelegate.getAutomationChildren();

 			var n:int = childList? childList.length:0;
 			// for (var i:int = 0;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17261
Author:   chiedozi@adobe.com
Date:     2010-08-11T00:04:51.995702Z

Log Message:
-----------
Added 240 dpi skin for ViewNavigator
Fixed bug where a deactivate event wasn't dispatched on the current view when the application is exiting
Fixed a bug where changing the selectedIndex of a ViewNavigator couldn't be canceled

QE notes:
Doc notes:
Bugs: SDK-27066,SDK-27345
Reviewer: Ryan
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264339 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
@@ -1,799 +1,800 @@
 package spark.components
 {
-    import flash.desktop.NativeApplication;
-    import flash.display.StageOrientation;
-    import flash.events.Event;
-    import flash.events.KeyboardEvent;
-    import flash.events.StageOrientationEvent;
-    import flash.net.registerClassAlias;
-    import flash.system.Capabilities;
-    import flash.ui.Keyboard;
-
-    import mx.core.IVisualElement;
-    import mx.core.mx_internal;
-    import mx.events.FlexEvent;
-    import mx.utils.BitFlagUtil;
-
-    import spark.components.supportClasses.ViewHistoryData;
-    import spark.components.supportClasses.ViewNavigatorSection;
-    import spark.core.managers.IPersistenceManager;
-    import spark.core.managers.PersistenceManager;
-    import spark.events.ElementExistenceEvent;
-    import spark.layouts.supportClasses.LayoutBase;
-
-    use namespace mx_internal;
-
-    [DefaultProperty("sections")]
-
-    //--------------------------------------
-    //  Events
-    //--------------------------------------
-
-    /**
-     *  @inheritDoc
-     */
-    [Event(name="applicationPersist", type="mx.events.FlexEvent")]
-
-    /**
-     *  @inheritDoc
-     */
-    [Event(name="applicationPersisting", type="mx.events.FlexEvent")]
-
-    /**
-     *  @inheritDoc
-     */
-    [Event(name="applicationRestore", type="mx.events.FlexEvent")]
-
-    /**
-     *  @inheritDoc
-     */
-    [Event(name="applicationRestoring", type="mx.events.FlexEvent")]
-
-    public class MobileApplication extends Application
-    {
-        //--------------------------------------------------------------------------
-        //
-        //  Class constants
-        //
-        //--------------------------------------------------------------------------
+import flash.desktop.NativeApplication;
+import flash.display.StageOrientation;
+import flash.events.Event;
+import flash.events.KeyboardEvent;
+import flash.events.StageOrientationEvent;
+import flash.net.registerClassAlias;
+import flash.system.Capabilities;
+import flash.ui.Keyboard;
+
+import mx.core.IVisualElement;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+import mx.utils.BitFlagUtil;
+
+import spark.components.supportClasses.ViewHistoryData;
+import spark.components.supportClasses.ViewNavigatorSection;
+import spark.core.managers.IPersistenceManager;
+import spark.core.managers.PersistenceManager;
+import spark.events.ElementExistenceEvent;
+import spark.layouts.supportClasses.LayoutBase;
+
+use namespace mx_internal;
+
+[DefaultProperty("sections")]
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  @inheritDoc
+ */
+[Event(name="applicationPersist", type="mx.events.FlexEvent")]
+
+/**
+ *  @inheritDoc
+ */
+[Event(name="applicationPersisting", type="mx.events.FlexEvent")]
+
+/**
+ *  @inheritDoc
+ */
+[Event(name="applicationRestore", type="mx.events.FlexEvent")]
+
+/**
+ *  @inheritDoc
+ */
+[Event(name="applicationRestoring", type="mx.events.FlexEvent")]
+
+public class MobileApplication extends Application
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    // The following constants are used to indicate whether the developer
+    // has explicitly set one of the navigator template properties.  This
+    // allows us to properly store these set properties if the navigator skin
+    // changes.
+
+    /**
+     *  @private
+     */
+    private static const ACTION_CONTENT_PROPERTY_FLAG:uint = 1 << 0;
+
+    /**
+     *  @private
+     */
+    private static const ACTION_LAYOUT_PROPERTY_FLAG:uint = 1 << 1;
+
+    /**
+     *  @private
+     */
+    private static const NAVIGATION_CONTENT_PROPERTY_FLAG:uint = 1 << 2;
+
+    /**
+     *  @private
+     */
+    private static const NAVIGATION_LAYOUT_PROPERTY_FLAG:uint = 1 << 3;
+
+    /**
+     *  @private
+     */
+    private static const TITLE_PROPERTY_FLAG:uint = 1 << 4;
+
+    /**
+     *  @private
+     */
+    private static const TITLE_CONTENT_PROPERTY_FLAG:uint = 1 << 5;
+
+    /**
+     *  @private
+     */
+    private static const TITLE_LAYOUT_PROPERTY_FLAG:uint = 1 << 6;
+
+    /**
+     *  @private
+     */
+    private static const SECTIONS_PROPERTY_FLAG:uint = 1 << 7;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Skin Parts
+    //
+    //--------------------------------------------------------------------------
+
+    [SkinPart(required="false")]
+    public var navigator:ViewNavigator;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    public function MobileApplication()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    private var navigatorProperties:Object = {};
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  firstViewData
+    //----------------------------------
+    /**
+     * @private
+     */
+    private var _firstViewData:Object;
+
+    /**
+     * This is the initialization data to pass to the
+     * root screen when it is created.
+     */
+    public function get firstViewData():Object
+    {
+        return _firstViewData;
+    }
+
+    /**
+     * @private
+     */
+    public function set firstViewData(value:Object):void
+    {
+        _firstViewData = value;
+    }
+
+    //----------------------------------
+    //  sessionCachingEnabled
+    //----------------------------------
+
+    private var _sessionCachingEnabled:Boolean = false;
+
+    public function get sessionCachingEnabled():Boolean
+    {
+        return _sessionCachingEnabled;
+    }
+    public function set sessionCachingEnabled(value:Boolean):void
+    {
+        _sessionCachingEnabled = value;
+    }
+
+    //----------------------------------
+    //  persistenceManager
+    //----------------------------------
+    private var _persistenceManager:IPersistenceManager;
+
+    public function get persistenceManager():IPersistenceManager
+    {
+        return _persistenceManager;
+    }
+
+    public function set persistenceManager(value:IPersistenceManager):void
+    {
+        _persistenceManager = value;
+    }
+
+    //----------------------------------
+    //  firstView
+    //----------------------------------
+    /**
+     *  @private
+     *  The backing variable for the firstView property.
+     */
+    private var _firstView:Class;
+
+    /**
+     *  This property is the object to use to initialize the first view
+     *  of the stack.
+     */
+    public function get firstView():Class
+    {
+        return _firstView;
+    }
+
+    /**
+     * @private
+     */
+    public function set firstView(value:Class):void
+    {
+        _firstView = value;
+    }
+
+    //----------------------------------
+    //  sections
+    //----------------------------------
+
+    [ArrayElementType("spark.components.supportClasses.ViewNavigatorSection")]
+    /**
+     *  Returns the stacks vector of the current navigator.
+     */
+    public function get sections():Vector.<ViewNavigatorSection>
+    {
+        if (navigator)
+            return navigator.sections;
+        else
+            return navigatorProperties.sections;
+    }
+
+    /**
+     *  @private
+     */
+    public function set sections(value:Vector.<ViewNavigatorSection>):void
+    {
+        if (navigator)
+        {
+            navigator.sections = (value == null) ? value : value.concat();
+            navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
+                SECTIONS_PROPERTY_FLAG, value != null);
+        }
+        else
+            navigatorProperties.sections = (value == null) ? value : value.concat();
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  UI Template Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  actionContent
+    //----------------------------------
+
+    [ArrayElementType("mx.core.IVisualElement")]
+    /**
+     *  Array of visual elements that are used as the ActionBar's
+     *  actionContent when this view is active.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get actionContent():Array
+    {
+        if (navigator)
+            return navigator.actionContent;
+        else
+            return navigatorProperties.actionContent;
+    }
+
+    /**
+     *  @private
+     */
+    public function set actionContent(value:Array):void
+    {
+        if (navigator)
+        {
+            navigator.actionContent = value;
+            navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
+                                        ACTION_CONTENT_PROPERTY_FLAG, value != null);
+        }
+        else
+            navigatorProperties.actionContent = value;
+    }
+
+    //----------------------------------
+    //  actionLayout
+    //----------------------------------
+
+    /**
+     *  Layout for the ActionBar's action content group.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get actionLayout():LayoutBase
+    {
+        if (navigator)
+            return navigator.actionLayout;
+        else
+            return navigatorProperties.actionLayout;
+    }
+    /**
+     *  @private
+     */
+    public function set actionLayout(value:LayoutBase):void
+    {
+        if (navigator)
+        {
+            navigator.actionLayout = value;
+            navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
+                                        ACTION_LAYOUT_PROPERTY_FLAG, value != null);
+        }
+        else
+            navigatorProperties.actionLayout = value;
+    }
+
+    //----------------------------------
+    //  navigationContent
+    //----------------------------------
+
+
+    [ArrayElementType("mx.core.IVisualElement")]
+    /**
+     *  Array of visual elements that are used as the ActionBar's
+     *  navigationContent when this view is active.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get navigationContent():Array
+    {
+        if (navigator)
+            return navigator.navigationContent;
+        else
+            return navigatorProperties.navigationContent;
+    }
+    /**
+     *  @private
+     */
+    public function set navigationContent(value:Array):void
+    {
+        if (navigator)
+        {
+            navigator.navigationContent = value;
+            navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
+                NAVIGATION_CONTENT_PROPERTY_FLAG, value != null);
+        }
+        else
+            navigatorProperties.navigationContent = value;
+    }
+
+    //----------------------------------
+    //  navigationLayout
+    //----------------------------------
+
+    /**
+     *  Layout for the ActionBar navigation content group.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+
+    public function get navigationLayout():LayoutBase
+    {
+        if (navigator)
+            return navigator.navigationLayout;
+        else
+            return navigatorProperties.navigationLayout;
+    }
+    /**
+     *  @private
+     */
+    public function set navigationLayout(value:LayoutBase):void
+    {
+        if (navigator)
+        {
+            navigator.navigationLayout = value;
+            navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
+                NAVIGATION_LAYOUT_PROPERTY_FLAG, value != null);
+        }
+        else
+            navigatorProperties.navigationLayout = value;
+    }
+
+    //----------------------------------
+    //  title
+    //----------------------------------
+
+    [Bindable]
+    /**
+     *
+     */
+    public function get title():String
+    {
+        if (navigator)
+            return navigator.title;
+        else
+            return navigatorProperties.title;
+    }
+
+    /**
+     *  @private
+     */
+    public function set title(value:String):void
+    {
+        if (navigator)
+        {
+            navigator.title = value;
+            navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
+                TITLE_PROPERTY_FLAG, value != null);
+        }
+        else
+            navigatorProperties.title = value;
+    }
+
+    //----------------------------------
+    //  titleContent
+    //----------------------------------
+
+    [ArrayElementType("mx.core.IVisualElement")]
+    /**
+     *  Array of visual elements that are used as the ActionBar's
+     *  titleContent when this view is active.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get titleContent():Array
+    {
+        if (navigator)
+            return navigator.titleContent;
+        else
+            return navigatorProperties.titleContent;
+    }
+    /**
+     *  @private
+     */
+    public function set titleContent(value:Array):void
+    {
+        if (navigator)
+        {
+            navigator.titleContent = value;
+            navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
+                TITLE_CONTENT_PROPERTY_FLAG, value != null);
+        }
+        else
+            navigatorProperties.titleContent = value;
+    }
+
+    //----------------------------------
+    //  titleLayout
+    //----------------------------------
+
+    /**
+     *  Layout for the ActionBar's titleContent group.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get titleLayout():LayoutBase
+    {
+        if (navigator)
+            return navigator.titleLayout;
+        else
+            return navigatorProperties.titleLayout;
+    }
+    /**
+     *  @private
+     */
+    public function set titleLayout(value:LayoutBase):void
+    {
+        if (navigator)
+        {
+            navigator.titleLayout = value;
+            navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
+                NAVIGATION_LAYOUT_PROPERTY_FLAG, value != null);
+        }
+        else
+            navigatorProperties.titleLayout = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *
+     */
+    protected function deviceKeyDownHandler(event:KeyboardEvent):void
+    {
+        var key:uint = event.keyCode;

-        // The following constants are used to indicate whether the developer
-        // has explicitly set one of the navigator template properties.  This
-        // allows us to properly store these set properties if the navigator skin
-        // changes.
+        // We want to prevent the default down behavior for back key if navigator
+        // is at root
+        if (key == Keyboard.BACK && navigator.selectedSectionLength > 1)
+            event.preventDefault();
+    }
+
+    /**
+     *
+     */
+    protected function deviceKeyUpHandler(event:KeyboardEvent):void
+    {
+        var key:uint = event.keyCode;

-        /**
-         *  @private
-         */
-        private static const ACTION_CONTENT_PROPERTY_FLAG:uint = 1 << 0;
+        if (key == Keyboard.BACK && navigator.selectedSectionLength > 1)
+            navigator.popView();
+    }
+
+    public function get landscapeOrientation():Boolean
+    {
+        return systemManager.stage.deviceOrientation == StageOrientation.ROTATED_LEFT ||
+            systemManager.stage.deviceOrientation == StageOrientation.ROTATED_RIGHT;
+    }
+
+    protected function persistViewData(event:Event = null):void
+    {
+        if (sessionCachingEnabled)
+            persistenceManager.setProperty("sectionData", sections);
+    }
+
+    protected function orientationChangeHandler(event:StageOrientationEvent):void
+    {
+        if (navigator)
+            navigator.landscapeOrientation = landscapeOrientation;
+    }
+
+    protected function applicationActivateHandler(event:Event):void
+    {
+    }
+
+    protected function applicationDeactivateHandler(event:Event):void
+    {
+        // Deactivate the current view
+        if (navigator && navigator.activeView)
+            navigator.activeView.active = false;
+
+        // This method called on Android when app run in background
+        if (sessionCachingEnabled)
+        {
+            // Dispatch event for saving persistence data
+            var eventDispatched:Boolean = true;
+            if (hasEventListener(FlexEvent.APPLICATION_PERSISTING))
+                eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_PERSISTING, false, true));
+
+            if (eventDispatched)
+            {
+                // Save version number of application
+                var appDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
+                var ns:Namespace = appDescriptor.namespace();
+
+                persistenceManager.setProperty("applicationVersion", appDescriptor.ns::versionNumber.toString());
+                persistenceManager.setProperty("timestamp", new Date().getMilliseconds());
+                persistenceManager.setProperty("selectedSection", navigator.selectedIndex);
+                persistenceManager.setProperty("sectionData", sections);
+
+                if (navigator && navigator.activeView)
+                    navigator.persistCurrentView();
+
+                persistenceManager.flush();
+
+                if (hasEventListener(FlexEvent.APPLICATION_PERSIST))
+                    eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_PERSIST));
+            }
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    override public function initialize():void
+    {
+        super.initialize();

-        /**
-         *  @private
-         */
-        private static const ACTION_LAYOUT_PROPERTY_FLAG:uint = 1 << 1;
+        // Add device key listeners
+        NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, applicationActivateHandler);

-        /**
-         *  @private
-         */
-        private static const NAVIGATION_CONTENT_PROPERTY_FLAG:uint = 1 << 2;
+        // We need to listen to different events on desktop and mobile because
+        // on desktop, the deactivate event is dispatched whenever the window loses
+        // focus.  This could cause persistence to run when the developer doesn't
+        // expect it to on desktop.
+        var os:String = Capabilities.os;
+        if (os.indexOf("Windows") != -1 || os.indexOf("Mac OS") != -1)
+            NativeApplication.nativeApplication.addEventListener(Event.EXITING, applicationDeactivateHandler);
+        else
+            NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, applicationDeactivateHandler);

-        /**
-         *  @private
-         */
-        private static const NAVIGATION_LAYOUT_PROPERTY_FLAG:uint = 1 << 3;
+        systemManager.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler);
+        systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, deviceKeyDownHandler);
+        systemManager.stage.addEventListener(KeyboardEvent.KEY_UP, deviceKeyUpHandler);

-        /**
-         *  @private
-         */
-        private static const TITLE_PROPERTY_FLAG:uint = 1 << 4;
-
-        /**
-         *  @private
-         */
-        private static const TITLE_CONTENT_PROPERTY_FLAG:uint = 1 << 5;
-
-        /**
-         *  @private
-         */
-        private static const TITLE_LAYOUT_PROPERTY_FLAG:uint = 1 << 6;
-
-        /**
-         *  @private
-         */
-        private static const SECTIONS_PROPERTY_FLAG:uint = 1 << 7;
-
-        //--------------------------------------------------------------------------
-        //
-        //  Skin Parts
-        //
-        //--------------------------------------------------------------------------
-
-        [SkinPart(required="false")]
-        public var navigator:ViewNavigator;
-
-        //--------------------------------------------------------------------------
-        //
-        //  Constructor
-        //
-        //--------------------------------------------------------------------------
-        public function MobileApplication()
-        {
-            super();
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Variables
-        //
-        //--------------------------------------------------------------------------
-
-        private var navigatorProperties:Object = {};
-
-        //--------------------------------------------------------------------------
-        //
-        //  Properties
-        //
-        //--------------------------------------------------------------------------
-
-        //----------------------------------
-        //  firstViewData
-        //----------------------------------
-        /**
-         * @private
-         */
-        private var _firstViewData:Object;
-
-        /**
-         * This is the initialization data to pass to the
-         * root screen when it is created.
-         */
-        public function get firstViewData():Object
-        {
-            return _firstViewData;
-        }
-
-        /**
-         * @private
-         */
-        public function set firstViewData(value:Object):void
-        {
-            _firstViewData = value;
-        }
-
-        //----------------------------------
-        //  sessionCachingEnabled
-        //----------------------------------
-
-        private var _sessionCachingEnabled:Boolean = false;
-
-        public function get sessionCachingEnabled():Boolean
-        {
-            return _sessionCachingEnabled;
-        }
-        public function set sessionCachingEnabled(value:Boolean):void
-        {
-            _sessionCachingEnabled = value;
-        }
-
-        //----------------------------------
-        //  persistenceManager
-        //----------------------------------
-        private var _persistenceManager:IPersistenceManager;
-
-        public function get persistenceManager():IPersistenceManager
-        {
-            return _persistenceManager;
-        }
-
-        public function set persistenceManager(value:IPersistenceManager):void
-        {
-            _persistenceManager = value;
-        }
-
-        //----------------------------------
-        //  firstView
-        //----------------------------------
-        /**
-         *  @private
-         *  The backing variable for the firstView property.
-         */
-        private var _firstView:Class;
-
-        /**
-         *  This property is the object to use to initialize the first view
-         *  of the stack.
-         */
-        public function get firstView():Class
-        {
-            return _firstView;
-        }
-
-        /**
-         * @private
-         */
-        public function set firstView(value:Class):void
-        {
-            _firstView = value;
-        }
-
-        //----------------------------------
-        //  sections
-        //----------------------------------
-
-        [ArrayElementType("spark.components.supportClasses.ViewNavigatorSection")]
-        /**
-         *  Returns the stacks vector of the current navigator.
-         */
-        public function get sections():Vector.<ViewNavigatorSection>
-        {
-            if (navigator)
-                return navigator.sections;
-            else
-                return navigatorProperties.sections;
-        }
-
-        /**
-         *  @private
-         */
-        public function set sections(value:Vector.<ViewNavigatorSection>):void
-        {
-            if (navigator)
-            {
-                navigator.sections = (value == null) ? value : value.concat();
-                navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
-                    SECTIONS_PROPERTY_FLAG, value != null);
-            }
-            else
-                navigatorProperties.sections = (value == null) ? value : value.concat();
-        }
-
-
-        //--------------------------------------------------------------------------
-        //
-        //  UI Template Properties
-        //
-        //--------------------------------------------------------------------------
-
-        //----------------------------------
-        //  actionContent
-        //----------------------------------
-
-        [ArrayElementType("mx.core.IVisualElement")]
-        /**
-         *  Array of visual elements that are used as the ActionBar's
-         *  actionContent when this view is active.
-         *
-         *  @default null
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 2.5
-         *  @productversion Flex 4.5
-         */
-        public function get actionContent():Array
-        {
-            if (navigator)
-                return navigator.actionContent;
-            else
-                return navigatorProperties.actionContent;
-        }
-
-        /**
-         *  @private
-         */
-        public function set actionContent(value:Array):void
-        {
-            if (navigator)
-            {
-                navigator.actionContent = value;
-                navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
-                                            ACTION_CONTENT_PROPERTY_FLAG, value != null);
-            }
-            else
-                navigatorProperties.actionContent = value;
-        }
-
-        //----------------------------------
-        //  actionLayout
-        //----------------------------------
-
-        /**
-         *  Layout for the ActionBar's action content group.
-         *
-         *  @default null
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 2.5
-         *  @productversion Flex 4.5
-         */
-        public function get actionLayout():LayoutBase
-        {
-            if (navigator)
-                return navigator.actionLayout;
-            else
-                return navigatorProperties.actionLayout;
-        }
-        /**
-         *  @private
-         */
-        public function set actionLayout(value:LayoutBase):void
-        {
-            if (navigator)
-            {
-                navigator.actionLayout = value;
-                navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
-                                            ACTION_LAYOUT_PROPERTY_FLAG, value != null);
-            }
-            else
-                navigatorProperties.actionLayout = value;
-        }
-
-        //----------------------------------
-        //  navigationContent
-        //----------------------------------
-
-
-        [ArrayElementType("mx.core.IVisualElement")]
-        /**
-         *  Array of visual elements that are used as the ActionBar's
-         *  navigationContent when this view is active.
-         *
-         *  @default null
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 2.5
-         *  @productversion Flex 4.5
-         */
-        public function get navigationContent():Array
-        {
-            if (navigator)
-                return navigator.navigationContent;
-            else
-                return navigatorProperties.navigationContent;
-        }
-        /**
-         *  @private
-         */
-        public function set navigationContent(value:Array):void
-        {
-            if (navigator)
-            {
-                navigator.navigationContent = value;
-                navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
-                    NAVIGATION_CONTENT_PROPERTY_FLAG, value != null);
-            }
-            else
-                navigatorProperties.navigationContent = value;
-        }
-
-        //----------------------------------
-        //  navigationLayout
-        //----------------------------------
-
-        /**
-         *  Layout for the ActionBar navigation content group.
-         *
-         *  @default null
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 2.5
-         *  @productversion Flex 4.5
-         */
-
-        public function get navigationLayout():LayoutBase
-        {
-            if (navigator)
-                return navigator.navigationLayout;
-            else
-                return navigatorProperties.navigationLayout;
-        }
-        /**
-         *  @private
-         */
-        public function set navigationLayout(value:LayoutBase):void
-        {
-            if (navigator)
-            {
-                navigator.navigationLayout = value;
-                navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
-                    NAVIGATION_LAYOUT_PROPERTY_FLAG, value != null);
-            }
-            else
-                navigatorProperties.navigationLayout = value;
-        }
-
-        //----------------------------------
-        //  title
-        //----------------------------------
-
-        [Bindable]
-        /**
-         *
-         */
-        public function get title():String
-        {
-            if (navigator)
-                return navigator.title;
-            else
-                return navigatorProperties.title;
-        }
-
-        /**
-         *  @private
-         */
-        public function set title(value:String):void
-        {
-            if (navigator)
-            {
-                navigator.title = value;
-                navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
-                    TITLE_PROPERTY_FLAG, value != null);
-            }
-            else
-                navigatorProperties.title = value;
-        }
-
-        //----------------------------------
-        //  titleContent
-        //----------------------------------
-
-        [ArrayElementType("mx.core.IVisualElement")]
-        /**
-         *  Array of visual elements that are used as the ActionBar's
-         *  titleContent when this view is active.
-         *
-         *  @default null
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 2.5
-         *  @productversion Flex 4.5
-         */
-        public function get titleContent():Array
-        {
-            if (navigator)
-                return navigator.titleContent;
-            else
-                return navigatorProperties.titleContent;
-        }
-        /**
-         *  @private
-         */
-        public function set titleContent(value:Array):void
-        {
-            if (navigator)
-            {
-                navigator.titleContent = value;
-                navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
-                    TITLE_CONTENT_PROPERTY_FLAG, value != null);
-            }
-            else
-                navigatorProperties.titleContent = value;
-        }
-
-        //----------------------------------
-        //  titleLayout
-        //----------------------------------
-
-        /**
-         *  Layout for the ActionBar's titleContent group.
-         *
-         *  @default null
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 2.5
-         *  @productversion Flex 4.5
-         */
-        public function get titleLayout():LayoutBase
-        {
-            if (navigator)
-                return navigator.titleLayout;
-            else
-                return navigatorProperties.titleLayout;
-        }
-        /**
-         *  @private
-         */
-        public function set titleLayout(value:LayoutBase):void
-        {
-            if (navigator)
-            {
-                navigator.titleLayout = value;
-                navigatorProperties = BitFlagUtil.update(navigatorProperties as uint,
-                    NAVIGATION_LAYOUT_PROPERTY_FLAG, value != null);
-            }
-            else
-                navigatorProperties.titleLayout = value;
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Methods
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *
-         */
-        protected function deviceKeyDownHandler(event:KeyboardEvent):void
-        {
-            var key:uint = event.keyCode;
-
-            // We want to prevent the default down behavior for back key if navigator
-            // is at root
-            if (key == Keyboard.BACK && navigator.selectedSectionLength > 1)
-                event.preventDefault();
-        }
-
-        /**
-         *
-         */
-        protected function deviceKeyUpHandler(event:KeyboardEvent):void
-        {
-            var key:uint = event.keyCode;
-
-            if (key == Keyboard.BACK && navigator.selectedSectionLength > 1)
-                navigator.popView();
-        }
-
-        public function get landscapeOrientation():Boolean
-        {
-            return systemManager.stage.deviceOrientation == StageOrientation.ROTATED_LEFT ||
-                systemManager.stage.deviceOrientation == StageOrientation.ROTATED_RIGHT;
-        }
-
-        protected function persistViewData(event:Event = null):void
-        {
-            if (sessionCachingEnabled)
-                persistenceManager.setProperty("sectionData", sections);
-        }
-
-        protected function orientationChangeHandler(event:StageOrientationEvent):void
-        {
-            if (navigator)
-                navigator.landscapeOrientation = landscapeOrientation;
-        }
-
-        protected function applicationActivateHandler(event:Event):void
-        {
-        }
-
-        protected function applicationDeactivateHandler(event:Event):void
-        {
-            // This method called on Android when app run in background
-            if (sessionCachingEnabled)
-            {
-                // Dispatch event for saving persistence data
-                var eventDispatched:Boolean = true;
-                if (hasEventListener(FlexEvent.APPLICATION_PERSISTING))
-                    eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_PERSISTING, false, true));
+        // Initialize objects related to session-persistence
+        if (sessionCachingEnabled)
+        {
+            // Register aliases for custom classes that will be written to
+            // persistence store by navigator
+            registerClassAlias("ViewHistoryData", ViewHistoryData);
+            registerClassAlias("ViewNavigatorSection", ViewNavigatorSection);
+
+            // Create persistence store
+            // Note: The shared object has to be loaded AFTER the class aliases are created
+            persistenceManager = new PersistenceManager();
+            persistenceManager.initialize();
+
+            // Dispatch event for loading persistence data
+            var eventDispatched:Boolean = true;
+            if (hasEventListener(FlexEvent.APPLICATION_RESTORING))
+                eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_RESTORING, false, true));
+
+            if (eventDispatched)
+            {
+                // Load saved sections
+                var savedSections:Vector.<ViewNavigatorSection>;
+                savedSections = persistenceManager.getProperty("sectionData") as Vector.<ViewNavigatorSection>;

-                if (eventDispatched)
+                if (savedSections != null)
+                    sections = savedSections;
+
+                if (persistenceManager.enabled)
                 {
-                    // Save version number of application
-                    var appDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
-                    var ns:Namespace = appDescriptor.namespace();
+                    var selectedSection:Number = persistenceManager.getProperty("selectedSection") as Number;

-                    persistenceManager.setProperty("applicationVersion", appDescriptor.ns::versionNumber.toString());
-                    persistenceManager.setProperty("timestamp", new Date().getMilliseconds());
-                    persistenceManager.setProperty("selectedSection", navigator.selectedIndex);
-                    persistenceManager.setProperty("sectionData", sections);
-
-                    if (navigator.activeView)
-                    {
-                        navigator.activeView.active = false;
-                        navigator.persistCurrentView();
-                    }
-
-                    persistenceManager.flush();
-
-                    if (hasEventListener(FlexEvent.APPLICATION_PERSIST))
-                        eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_PERSIST));
-                }
-            }
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Overridden methods: UIComponent
-        //
-        //--------------------------------------------------------------------------
-
-        override public function initialize():void
-        {
-            super.initialize();
-
-            // Add device key listeners
-            NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, applicationActivateHandler);
-
-            // We need to listen to different events on desktop and mobile because
-            // on desktop, the deactivate event is dispatched whenever the window loses
-            // focus.  This could cause persistence to run when the developer doesn't
-            // expect it to on desktop.
-            var os:String = Capabilities.os;
-            if (os.indexOf("Windows") != -1 || os.indexOf("Mac OS") != -1)
-                NativeApplication.nativeApplication.addEventListener(Event.EXITING, applicationDeactivateHandler);
-            else
-                NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, applicationDeactivateHandler);
-
-            systemManager.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler);
-            systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, deviceKeyDownHandler);
-            systemManager.stage.addEventListener(KeyboardEvent.KEY_UP, deviceKeyUpHandler);
-
-            // Initialize objects related to session-persistence
-            if (sessionCachingEnabled)
-            {
-                // Register aliases for custom classes that will be written to
-                // persistence store by navigator
-                registerClassAlias("ViewHistoryData", ViewHistoryData);
-                registerClassAlias("ViewNavigatorSection", ViewNavigatorSection);
-
-                // Create persistence store
-                // Note: The shared object has to be loaded AFTER the class aliases are created
-                persistenceManager = new PersistenceManager();
-                persistenceManager.initialize();
-
-                // Dispatch event for loading persistence data
-                var eventDispatched:Boolean = true;
-                if (hasEventListener(FlexEvent.APPLICATION_RESTORING))
-                    eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_RESTORING, false, true));
-
-                if (eventDispatched)
-                {
-                    // Load saved sections
-                    var savedSections:Vector.<ViewNavigatorSection>;
-                    savedSections = persistenceManager.getProperty("sectionData") as Vector.<ViewNavigatorSection>;
-
-                    if (savedSections != null)
-                        sections = savedSections;
-
-                    if (persistenceManager.enabled)
-                    {
-                        var selectedSection:Number = persistenceManager.getProperty("selectedSection") as Number;
-
-                        if (selectedSection && selectedSection > 0 && selectedSection < savedSections.length)
-                            navigator.selectedIndex = selectedSection;
-
-                        if (navigator.tabBar)
-                            navigator.tabBar.selectedIndex = navigator.selectedIndex;
-                    }
-
-                    // Clear previously persisted data
-                    persistenceManager.clear();
-
-                    if (hasEventListener(FlexEvent.APPLICATION_RESTORE))
-                        eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_RESTORE));
-                }
-            }
-
-            // If the sections property is not set by this point, MobileApplication will
-            // create a default section to be used by the navigator, and initialize it
-            // with the firstView and firstViewData defined by the application
-            if (sections == null || sections.length == 0)
-            {
-                // Create the empty screen stack and initialize it with the
-                // desired firstView and its data
-                var section:ViewNavigatorSection = new ViewNavigatorSection();
-                section.firstView = firstView;
-                section.firstViewData = firstViewData;
-
-                // Set the stacks of the navigator
-                var newSections:Vector.<ViewNavigatorSection> = Vector.<ViewNavigatorSection>([section]);
-                sections = newSections;
-            }
-        }
-
-        override protected function partAdded(partName:String, instance:Object):void
-        {
-            super.partAdded(partName, instance);
-
-            if (instance == navigator)
-            {
-                var newNavigatorProperties:uint = 0;
-
-                if (navigatorProperties.sections != undefined)
-                {
-                    navigator.sections = navigatorProperties.sections;
-                    newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
-                                                    SECTIONS_PROPERTY_FLAG, true);
+                    if (selectedSection && selectedSection > 0 && selectedSection < savedSections.length)
+                        navigator.selectedIndex = selectedSection;
+
+                    if (navigator.tabBar)
+                        navigator.tabBar.selectedIndex = navigator.selectedIndex;
                 }

-                if (navigatorProperties.actionContent != undefined)
-                {
-                    navigator.actionContent = navigatorProperties.actionContent;
-                    newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
-                                                    ACTION_CONTENT_PROPERTY_FLAG, true);
-                }
+                // Clear previously persisted data
+                persistenceManager.clear();

-                if (navigatorProperties.actionLayout != undefined)
-                {
-                    navigator.actionLayout = navigatorProperties.actionLayout;
-                    newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
-                        ACTION_LAYOUT_PROPERTY_FLAG, true);
-                }
-
-
-                if (navigatorProperties.navigationContent != undefined)
-                {
-                    navigator.navigationContent = navigatorProperties.navigationContent;
-                    newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
-                        NAVIGATION_CONTENT_PROPERTY_FLAG, true);
-                }
-
-                if (navigatorProperties.navigationLayout != undefined)
-                {
-                    navigator.navigationLayout = navigatorProperties.navigationLayout;
-                    newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
-                        NAVIGATION_LAYOUT_PROPERTY_FLAG, true);
-                }
-
-                if (navigatorProperties.title != undefined)
-                {
-                    navigator.title = navigatorProperties.title;
-                    newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
-                        TITLE_PROPERTY_FLAG, true);
-                }
-
-                if (navigatorProperties.titleContent != undefined)
-                {
-                    navigator.titleContent = navigatorProperties.titleContent;
-                    newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
-                        TITLE_CONTENT_PROPERTY_FLAG, true);
-                }
-
-                if (navigatorProperties.titleLayout != undefined)
-                {
-                    navigator.titleLayout = navigatorProperties.titleLayout;
-                    newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
-                        TITLE_LAYOUT_PROPERTY_FLAG, true);
-                }
-
-                navigatorProperties = newNavigatorProperties;
-                navigator.landscapeOrientation = landscapeOrientation;
-
-                // Set the stage focus to the navigator
-                systemManager.stage.focus = navigator;
+                if (hasEventListener(FlexEvent.APPLICATION_RESTORE))
+                    eventDispatched = dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_RESTORE));
             }
         }

-        override protected function partRemoved(partName:String, instance:Object):void
-        {
-            super.partRemoved(partName, instance);
-
-            if (instance == navigator)
-            {
-                var newNavigatorProperties:Object = {};
-
-                if (BitFlagUtil.isSet(navigatorProperties as uint, SECTIONS_PROPERTY_FLAG))
-                    newNavigatorProperties.sections = navigator.sections;
-
-                if (BitFlagUtil.isSet(navigatorProperties as uint, ACTION_CONTENT_PROPERTY_FLAG))
-                    newNavigatorProperties.actionContent = navigator.actionContent;
-
-                if (BitFlagUtil.isSet(navigatorProperties as uint, ACTION_LAYOUT_PROPERTY_FLAG))
-                    newNavigatorProperties.actionLayout = navigator.actionLayout;
-
-                if (BitFlagUtil.isSet(navigatorProperties as uint, NAVIGATION_CONTENT_PROPERTY_FLAG))
-                    newNavigatorProperties.navigationContent = navigator.navigationContent;
-
-                if (BitFlagUtil.isSet(navigatorProperties as uint, NAVIGATION_LAYOUT_PROPERTY_FLAG))
-                    newNavigatorProperties.navigationLayout = navigator.navigationLayout;
-
-                if (BitFlagUtil.isSet(navigatorProperties as uint, TITLE_PROPERTY_FLAG))
-                    newNavigatorProperties.title = navigator.title;
-
-                if (BitFlagUtil.isSet(navigatorProperties as uint, TITLE_CONTENT_PROPERTY_FLAG))
-                    newNavigatorProperties.titleContent = navigator.titleContent;
-
-                if (BitFlagUtil.isSet(navigatorProperties as uint, TITLE_LAYOUT_PROPERTY_FLAG))
-                    newNavigatorProperties.titleLayout = navigator.titleLayout;
-
-                navigatorProperties = newNavigatorProperties;
-            }
-        }
-    }
+        // If the sections property is not set by this point, MobileApplication will
+        // create a default section to be used by the navigator, and initialize it
+        // with the firstView and firstViewData defined by the application
+        if (sections == null || sections.length == 0)
+        {
+            // Create the empty screen stack and initialize it with the
+            // desired firstView and its data
+            var section:ViewNavigatorSection = new ViewNavigatorSection();
+            section.firstView = firstView;
+            section.firstViewData = firstViewData;
+
+            // Set the stacks of the navigator
+            var newSections:Vector.<ViewNavigatorSection> = Vector.<ViewNavigatorSection>([section]);
+            sections = newSections;
+        }
+    }
+
+    override protected function partAdded(partName:String, instance:Object):void
+    {
+        super.partAdded(partName, instance);
+
+        if (instance == navigator)
+        {
+            var newNavigatorProperties:uint = 0;
+
+            if (navigatorProperties.sections != undefined)
+            {
+                navigator.sections = navigatorProperties.sections;
+                newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
+                                                SECTIONS_PROPERTY_FLAG, true);
+            }
+
+            if (navigatorProperties.actionContent != undefined)
+            {
+                navigator.actionContent = navigatorProperties.actionContent;
+                newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
+                                                ACTION_CONTENT_PROPERTY_FLAG, true);
+            }
+
+            if (navigatorProperties.actionLayout != undefined)
+            {
+                navigator.actionLayout = navigatorProperties.actionLayout;
+                newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
+                    ACTION_LAYOUT_PROPERTY_FLAG, true);
+            }
+
+
+            if (navigatorProperties.navigationContent != undefined)
+            {
+                navigator.navigationContent = navigatorProperties.navigationContent;
+                newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
+                    NAVIGATION_CONTENT_PROPERTY_FLAG, true);
+            }
+
+            if (navigatorProperties.navigationLayout != undefined)
+            {
+                navigator.navigationLayout = navigatorProperties.navigationLayout;
+                newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
+                    NAVIGATION_LAYOUT_PROPERTY_FLAG, true);
+            }
+
+            if (navigatorProperties.title != undefined)
+            {
+                navigator.title = navigatorProperties.title;
+                newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
+                    TITLE_PROPERTY_FLAG, true);
+            }
+
+            if (navigatorProperties.titleContent != undefined)
+            {
+                navigator.titleContent = navigatorProperties.titleContent;
+                newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
+                    TITLE_CONTENT_PROPERTY_FLAG, true);
+            }
+
+            if (navigatorProperties.titleLayout != undefined)
+            {
+                navigator.titleLayout = navigatorProperties.titleLayout;
+                newNavigatorProperties = BitFlagUtil.update(newNavigatorProperties,
+                    TITLE_LAYOUT_PROPERTY_FLAG, true);
+            }
+
+            navigatorProperties = newNavigatorProperties;
+            navigator.landscapeOrientation = landscapeOrientation;
+
+            // Set the stage focus to the navigator
+            systemManager.stage.focus = navigator;
+        }
+    }
+
+    override protected function partRemoved(partName:String, instance:Object):void
+    {
+        super.partRemoved(partName, instance);
+
+        if (instance == navigator)
+        {
+            var newNavigatorProperties:Object = {};
+
+            if (BitFlagUtil.isSet(navigatorProperties as uint, SECTIONS_PROPERTY_FLAG))
+                newNavigatorProperties.sections = navigator.sections;
+
+            if (BitFlagUtil.isSet(navigatorProperties as uint, ACTION_CONTENT_PROPERTY_FLAG))
+                newNavigatorProperties.actionContent = navigator.actionContent;
+
+            if (BitFlagUtil.isSet(navigatorProperties as uint, ACTION_LAYOUT_PROPERTY_FLAG))
+                newNavigatorProperties.actionLayout = navigator.actionLayout;
+
+            if (BitFlagUtil.isSet(navigatorProperties as uint, NAVIGATION_CONTENT_PROPERTY_FLAG))
+                newNavigatorProperties.navigationContent = navigator.navigationContent;
+
+            if (BitFlagUtil.isSet(navigatorProperties as uint, NAVIGATION_LAYOUT_PROPERTY_FLAG))
+                newNavigatorProperties.navigationLayout = navigator.navigationLayout;
+
+            if (BitFlagUtil.isSet(navigatorProperties as uint, TITLE_PROPERTY_FLAG))
+                newNavigatorProperties.title = navigator.title;
+
+            if (BitFlagUtil.isSet(navigatorProperties as uint, TITLE_CONTENT_PROPERTY_FLAG))
+                newNavigatorProperties.titleContent = navigator.titleContent;
+
+            if (BitFlagUtil.isSet(navigatorProperties as uint, TITLE_LAYOUT_PROPERTY_FLAG))
+                newNavigatorProperties.titleLayout = navigator.titleLayout;
+
+            navigatorProperties = newNavigatorProperties;
+        }
+    }
+}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1265685 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorApplicationSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorApplicationSkin.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Change 20080828-hqm-s by hqm@badtzmaru.home on 2008-08-28 22:46:43 EDT
    in /Users/hqm/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: swf9 cursor bug

New Features:

Bugs Fixed:

Technical Reviewer: max
QA Reviewer: pbr
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

sprite.clickbutton may be null, so check before dereferencing

Tests:

run test/swf9/hello.lzx in swf9, click on the text which says "I am clickable text", verify
that this runtime error does not occur:

 TypeError: Error #1009: Cannot access a property or method of a null object reference.
	 at LzSprite/__mouseEvent()[/private/tmp/lzswf9/lzgen25836/LzSprite.as:344]

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@10840 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
@@ -352,11 +352,9 @@
             }

             // If this.showhandcursor is null, inherit value from LzMouseKernel.showhandcursor
-            if (this.clickable) {
+            if (this.clickable && this.clickbutton) {
                 this.clickbutton.useHandCursor = (showhandcursor == null) ? LzMouseKernel.showhandcursor : showhandcursor;
             }
-
-

       }


no longer opening ProbeToolTipEditor from blank admin session

Change-Id: I575f738087dd0b42532edf2ecae4abb9628577fb

--- WeaveClient/src/weave/VisApplication.as
+++ WeaveClient/src/weave/VisApplication.as
@@ -289,8 +289,6 @@
 				// When we're creating a new config through the admin console, create a
 				// WeaveDataSource so the admin doesn't have to add it manually every time.
 				Weave.root.requestObject(null, WeaveDataSource, false);
-				// It's convenient if the admin sets probed columns first so new tools will have default attributes selected.
-				DraggablePanel.openStaticInstance(ProbeToolTipEditor);
 			}
 			else
 			{


improved debugDisplayList()

improved debugDisplayList()

Change-Id: Ibf2be8945d866b4457b2e4423ab4a0622282ef7f

--- WeaveCore/src/weave/utils/DebugUtils.as
+++ WeaveCore/src/weave/utils/DebugUtils.as
@@ -239,18 +239,41 @@
 		 **  Miscellaneous  **
 		 *********************/

-		public static function debugDisplayList(root:DisplayObject, maxDepth:int = -1, currentDepth:int = 0):String
-		{
-			var pad:String = StandardLib.lpad('', currentDepth * 2, '| ');
+		public static function debugDisplayList(root:DisplayObject, maxDepth:int = -1, labelPropertyOrFunction:* = 'name'):String
+		{
+			return _debugDisplayList(root, maxDepth, labelPropertyOrFunction, 0, '', '');
+		}
+		private static function _debugDisplayList(root:DisplayObject, maxDepth:int, labelPropertyOrFunction:*, currentDepth:int, indent:String, childIndent:String):String
+		{
 			var rect:Rectangle = root.getRect(root.parent);
-			var str:String = StandardLib.substitute("{0}{1} ({2}) {3}\n", pad, root.name, debugId(root), rect);
+			var label:String;
+			try
+			{
+				if (labelPropertyOrFunction is Function)
+					label = labelPropertyOrFunction(root);
+				else
+					label = root[labelPropertyOrFunction];
+			}
+			catch (e:*) { }
+
+			var str:String = StandardLib.substitute("{0}{1} ({2}) {3}\n", indent, label, debugId(root), rect);

 			var container:DisplayObjectContainer = root as DisplayObjectContainer;
 			if (container && currentDepth != maxDepth)
-				for (var i:int = 0; i < container.numChildren; i++)
-					str += debugDisplayList(container.getChildAt(i), maxDepth, currentDepth + 1);
+			{
+				var n:int = container.numChildren;
+				for (var i:int = 0; i < n; i++)
+				{
+					var nextIndent:String = childIndent + (i < n - 1 ? indents[0] : indents[1]);
+					var nextChildIndent:String = childIndent + (i < n - 1 ? indents[2] : indents[3]);
+					str += _debugDisplayList(container.getChildAt(i), maxDepth, labelPropertyOrFunction, currentDepth + 1, nextIndent, nextChildIndent);
+				}
+			}
 			return str;
 		}
+		private static const indents:Array = ['|- ', '`- ', '|  ', '   '];
+		private static const indentsHeavy:Array = ['\u2523 ', '\u2517 ', '\u2503 ', '   '];
+		private static const indentsLight:Array = ['\u251c ', '\u2514 ', '\u2502 ', '   '];

 		private static const STACK_TRACE_DELIM:String = '\n\tat ';
 		/**


renamed Effect.changePasses() to Effect.setPasses()

--- src/aerys/minko/render/effect/Effect.as
+++ src/aerys/minko/render/effect/Effect.as
@@ -44,7 +44,7 @@
 			return _passes[index];
 		}

-		public function changePasses(newPasses : Vector.<Shader>) : void
+		public function setPasses(newPasses : Vector.<Shader>) : void
 		{
 			_passes = newPasses.slice();
 			_passesChanged.execute(this);


Need a toString() here too.

Need a toString() here too.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4679 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/util/langBoolean.as
+++ src/as/com/threerings/util/langBoolean.as
@@ -67,5 +67,11 @@
     {
         return value;
     }
+
+    // cannot use the override keyword on toString() because actionscript is stupid
+    public function toString () :String
+    {
+        return value.toString();
+    }
 }
 }


Add .hdr to image & texture picker filter lists.

--- bin/Data/Scripts/Editor/AttributeEditor.as
+++ bin/Data/Scripts/Editor/AttributeEditor.as
@@ -1170,11 +1170,11 @@
 {
     // Fill resource picker data
     Array<String> fontFilters = {"*.ttf", "*.otf", "*.fnt", "*.xml", "*.sdf"};
-    Array<String> imageFilters = {"*.png", "*.jpg", "*.bmp", "*.tga"};
+    Array<String> imageFilters = {"*.png", "*.jpg", "*.bmp", "*.tga", "*.hdr"};
     Array<String> luaFileFilters = {"*.lua", "*.luc"};
     Array<String> scriptFilters = {"*.as", "*.asc"};
     Array<String> soundFilters = {"*.wav","*.ogg"};
-    Array<String> textureFilters = {"*.dds", "*.png", "*.jpg", "*.bmp", "*.tga", "*.ktx", "*.pvr"};
+    Array<String> textureFilters = {"*.dds", "*.png", "*.jpg", "*.bmp", "*.tga", "*.ktx", "*.pvr", "*.hdr"};
     Array<String> materialFilters = {"*.xml", "*.material", "*.json"};
     Array<String> anmSetFilters = {"*.scml"};
     Array<String> pexFilters = {"*.pex"};


Added a UI test in TestSlider to validate Slider thumb not showing up based on when addChild was being called (http://github.com/arpit/openpyro/issues/#issue/1)

--- examples/OpenPyroExample/src/TestSlider.as
+++ examples/OpenPyroExample/src/TestSlider.as
@@ -1,17 +1,20 @@
 package
 {
+	import flash.display.Sprite;
+	import flash.events.Event;
+	import flash.events.MouseEvent;
+
 	import org.openPyro.aurora.AuroraScrollBarSkin;
 	import org.openPyro.aurora.AuroraSliderSkin;
 	import org.openPyro.controls.ScrollBar;
 	import org.openPyro.controls.Slider;
 	import org.openPyro.core.Direction;
+	import org.openPyro.core.UIContainer;
 	import org.openPyro.events.PyroEvent;
 	import org.openPyro.examples.HaloTrackSkin;
 	import org.openPyro.examples.SimpleButtonSkin;
-
-	import flash.display.Sprite;
-	import flash.events.Event;
-	import flash.events.MouseEvent;
+	import org.openPyro.layout.VLayout;
+	import org.openPyro.painters.FillPainter;

 	public class TestSlider extends Sprite
 	{
@@ -22,9 +25,41 @@
 			stage.scaleMode = "noScale";
 			stage.align = "TL";

-			testScrollBarWithAuroraSkin();
+			//testScrollBarWithAuroraSkin();
 			//testSliderWithAuroraSkin();
-			stage.addEventListener(Event.RESIZE, onResize)
+			testSliderBug();
+			//stage.addEventListener(Event.RESIZE, onResize)
+		}
+
+		private function testSliderBug():void{
+
+			var container = new UIContainer();
+			container.setSize(585, 700);
+			container.layout = new VLayout(10);
+
+			container.backgroundPainter = new FillPainter(0xcccccc);
+
+			var redMultiplier = new Slider(Direction.HORIZONTAL);
+			redMultiplier.percentWidth = 90;
+			redMultiplier.height = 15;
+			redMultiplier.minimum = 0;
+			redMultiplier.maximum = 4;
+			redMultiplier.skin = new AuroraSliderSkin();
+			redMultiplier.thumbButtonWidth = 10;
+			container.addChild(redMultiplier);
+			redMultiplier.value = 1;
+
+			var greenMultiplier = new Slider(Direction.HORIZONTAL);
+			greenMultiplier.percentWidth = 90;
+			greenMultiplier.height = 15;
+			greenMultiplier.minimum = 0;
+			greenMultiplier.maximum = 4;
+			greenMultiplier.skin = new AuroraSliderSkin();
+			greenMultiplier.thumbButtonWidth = 10;
+			greenMultiplier.value = 1;
+			container.addChild(greenMultiplier);
+
+			addChild(container);
 		}

 		private function onResize(event:Event):void
@@ -64,10 +99,17 @@
 		private var slider:Slider
 		private function testSliderWithAuroraSkin():void
 		{
+
+			var uic:UIContainer = new UIContainer();
+			uic.width = 400;
+			uic.height = 200;
+			uic.backgroundPainter = new FillPainter(0xefefef);
+			addChild(uic);
+
+			/*
 			slider = new Slider(Direction.VERTICAL);
 			addChild(slider);

-			slider = new Slider(Direction.VERTICAL);
 			slider.setSize(15, stage.stageHeight/3);

 			var sliderSkin:AuroraSliderSkin = new AuroraSliderSkin()
@@ -75,19 +117,26 @@
 			slider.skin = sliderSkin
 			slider.x = 50;
 			slider.y = 100;
+			slider.thumbButtonHeight = 20
+
 			addChild(slider);
+			*/

 			var hSlider:Slider = new Slider(Direction.HORIZONTAL);
-			hSlider.width = 300
+			hSlider.width = 200
 			hSlider.height = 15;
+			hSlider.thumbButtonWidth = 20;
+
+
+
+			uic.addChild(hSlider)

 			var hSliderSkin:AuroraSliderSkin = new AuroraSliderSkin()
 			hSliderSkin.trackGradientRotation = Math.PI/2
-
 			hSlider.skin = hSliderSkin

-			addChild(hSlider)
-			hSlider.x = 100
+
+			hSlider.x = 50;
 			hSlider.y = 50;

 			stage.addEventListener(MouseEvent.CLICK, function():void{


fix typo

fix typo

--- src/aerys/minko/type/clone/CloneOptions.as
+++ src/aerys/minko/type/clone/CloneOptions.as
@@ -62,7 +62,7 @@
                 LightController,
                 DirectionalLightController,
                 SpotLightController,
-                PointLightController,
+                PointLightController
 			);
 			cloneOptions._defaultControllerAction = ControllerCloneAction.REASSIGN;


fix HLSAMatrix4x4.updateDiffuseColorMatrix() to use Matrix4x4.setColumn() instead of Matrix4x4.appendTranslation() to handle alpha and override HLSAMatrix4x4.clone() to return an HLSAMatrix4x4 instance

--- src/aerys/minko/type/math/HLSAMatrix4x4.as
+++ src/aerys/minko/type/math/HLSAMatrix4x4.as
@@ -10,7 +10,7 @@
 		private static const BWGT			: Number 			= 0.0820;
 		private static const SQRT2			: Number			= Math.sqrt(2.0);
 		private static const SQRT3			: Number			= Math.sqrt(3.0);
-		private static const INV_SQRT2		: Number			= 1.0 / SQRT2;
+		private static const INV_SQRT2		: Number			= 1. / SQRT2;

 		private var _hue				: Number		= 0;
 		private var _saturation			: Number		= 1;
@@ -174,7 +174,10 @@
 			updateDiffuseColorMatrix();
 		}

-		public function HLSAMatrix4x4(hue : Number, luminance : Number, saturation : Number, alpha : Number)
+		public function HLSAMatrix4x4(hue 			: Number	= 0.,
+									  luminance 	: Number	= 1.,
+									  saturation 	: Number	= 1.,
+									  alpha 		: Number	= 1.)
 		{
 			super();

@@ -193,8 +196,13 @@
 			append(_hueMatrix);
 			append(_saturationMatrix);
 			append(_luminanceMatrix);
-			appendTranslation(0, 0, _alpha);
+			setColumn(3, new Vector4(0, 0, 0, _alpha));
 			unlock();
+		}
+
+		override public function clone() : Matrix4x4
+		{
+			return new HLSAMatrix4x4(_hue, _luminance, _saturation, _alpha);
 		}
 	}
 }


Level tweaks

Level tweaks

--- src/Levels/Level.as
+++ src/Levels/Level.as
@@ -72,6 +72,14 @@
 			predecessors = new Vector.<Level>;
 		}

+		public function get successors():Vector.<Level> {
+			var successors:Vector.<Level> = new Vector.<Level>;
+			for each (var level:Level in U.levels)
+				if (level.predecessors.indexOf(this) != -1)
+					successors.push(level);
+			return successors;
+		}
+
 		public function setHighScore(modules:int):void {
 			if (modules < fewestModules || !fewestModules) {
 				fewestModules = modules;
@@ -186,13 +194,13 @@

 			var pipeTutorial:Level = new Level("Pipeline Tutorial", new PipelineTutorialGoal, true,
 											   [ConstIn, Adder, Latch, DataWriterT, DataReader, InstructionDecoder, SysDelayClock, And], [OpcodeValue.OP_SAVI]);
-			pipeTutorial.predecessors.push(OP_TUT, D2_TUT);
+			pipeTutorial.predecessors.push(D2_TUT);

 			levels.push(pipeTutorial);

 			var pipeShard:LevelShard = delayShard.compositWith(LevelShard.SPD);
 			var pipe:Level = new ShardLevel("Efficiency!", pipeShard);
-			pipe.predecessors.push(addCPU_D); //dubious
+			pipe.predecessors.push(pipeTutorial, addCPU_D);
 			var pipeJMP:Level = new ShardLevel("Efficient Jump", pipeShard.compositWith( LevelShard.JUMP));
 			pipeJMP.predecessors.push(pipe, cpuJMP);
 			var pipeBranch:Level = new ShardLevel("Efficient Branch", pipeShard.compositWith( LevelShard.JUMP, LevelShard.BRANCH));


Store pending widget type loaders separately to avoid messing load order.

--- src/com/esri/builder/controllers/supportClasses/StartupWidgetTypeLoader.as
+++ src/com/esri/builder/controllers/supportClasses/StartupWidgetTypeLoader.as
@@ -70,7 +70,7 @@
             }
         }

-        pendingLoaders = loaders;
+        pendingLoaders = loaders.concat();
         for each (var loader:WidgetTypeLoader in loaders)
         {
             loader.addEventListener(WidgetTypeLoaderEvent.LOAD_COMPLETE, loader_loadCompleteHandler);


Transferred from the Adobe Open Source Subversion Repository

Revision: 7743
Author:   clucier@adobe.com
Date:     2009-06-11T13:53:10.203664Z

Log Message:
-----------
Moving away from using namespace qualifiers in most cases in the SDK.  We've run into a few cases now where the use of qualifiers in code that is called excessively can slow things down.
Bugs: SDK-21337
Reviewer: Ryan, Paul
QE Notes: None
Tests: Ran several random Mustella test groups, checkintests.

Modified Paths:
--------------
106 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1260206 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/effects/EffectManager.as
+++ frameworks/projects/framework/src/mx/effects/EffectManager.as
@@ -184,11 +184,11 @@
     {
         // Iterate through the array backward, because calling end()
         // may cause the element to be removed from the array.
-        var n:int = mx_internal::effectsPlaying.length;
+        var n:int = effectsPlaying.length;
         for (var i:int = n - 1; i >= 0; i--)
         {
             var otherInst:EffectInstance =
-                mx_internal::effectsPlaying[i].instance;
+                effectsPlaying[i].instance;
             if (otherInst.target == target)
                 otherInst.end();
         }
@@ -207,7 +207,7 @@
         if (eventName != null && eventName != "")
         {
             target.addEventListener(eventName,
-                                    EffectManager.mx_internal::eventHandler,
+                                    EffectManager.eventHandler,
                                     false, EventPriority.EFFECT);
         }
     }
@@ -568,12 +568,12 @@
                 {
                     return;
                 }
-                else if (UIComponent(eventObj.target).mx_internal::isEffectStarted)
-                {
-                    for (var i:int = 0; i < UIComponent(eventObj.target).mx_internal::_effectsStarted.length; i++)
+                else if (UIComponent(eventObj.target).isEffectStarted)
+                {
+                    for (var i:int = 0; i < UIComponent(eventObj.target)._effectsStarted.length; i++)
                     {
                         // Don't allow removedEffect to trigger more than one effect at a time
-                        if (UIComponent(eventObj.target).mx_internal::_effectsStarted[i].triggerEvent.type == Event.REMOVED)
+                        if (UIComponent(eventObj.target)._effectsStarted[i].triggerEvent.type == Event.REMOVED)
                             return;
                     }
                 }
@@ -613,7 +613,7 @@
     private static function createAndPlayEffect(eventObj:Event, target:Object):void
     {

-        var effectInst:Effect = mx_internal::createEffectForType(target, eventObj.type);
+        var effectInst:Effect = createEffectForType(target, eventObj.type);
         if (!effectInst)
             return;

@@ -682,13 +682,13 @@
         // then finish the other effect before starting this new one.
         //
         if (effectInst.target is UIComponent &&
-            UIComponent(effectInst.target).mx_internal::isEffectStarted)
+            UIComponent(effectInst.target).isEffectStarted)
         {
             var affectedProps:Array = effectInst.getAffectedProperties();
             for (i = 0; i < affectedProps.length; i++)
             {
                 var runningInstances:Array =
-                    effectInst.target.mx_internal::getEffectsForProperty(affectedProps[i]);
+                    effectInst.target.getEffectsForProperty(affectedProps[i]);
                 if (runningInstances.length > 0)
                 {
                     if (eventObj.type == ResizeEvent.RESIZE)
@@ -697,11 +697,11 @@
                     for (j = 0; j < runningInstances.length; j++)
                     {
                         var otherInst:EffectInstance = runningInstances[j];
-                        if (eventObj.type == FlexEvent.SHOW && otherInst.mx_internal::hideOnEffectEnd)
+                        if (eventObj.type == FlexEvent.SHOW && otherInst.hideOnEffectEnd)
                         {
                             otherInst.target.removeEventListener(
                                 FlexEvent.SHOW, otherInst.eventHandler);
-                            otherInst.mx_internal::hideOnEffectEnd = false;
+                            otherInst.hideOnEffectEnd = false;

                         }

@@ -740,7 +740,7 @@
         // onEffectEnd handler will remove this effect from the effectsPlaying
         // array.
         effectInst.addEventListener(EffectEvent.EFFECT_END,
-                                    EffectManager.mx_internal::effectEndHandler);
+                                    EffectManager.effectEndHandler);

         lastEffectCreated = effectInst;

@@ -748,7 +748,7 @@
         n = instances.length;
         for (i = 0; i < n; i++)
         {
-            mx_internal::effectsPlaying.push(
+            effectsPlaying.push(
                 new EffectNode(effectInst, instances[i]));
         }

@@ -782,12 +782,12 @@
         // This function is called when an effect, which was started
         // earlier by this effect manager, finishes playing.  Remove
         // this effect from the "effectPlaying" list
-        var n:int = mx_internal::effectsPlaying.length;
+        var n:int = effectsPlaying.length;
         for (var i:int = n - 1; i >= 0; i--)
         {
-            if (mx_internal::effectsPlaying[i].instance == effectInst)
-            {
-                mx_internal::effectsPlaying.splice(i, 1);
+            if (effectsPlaying[i].instance == effectInst)
+            {
+                effectsPlaying.splice(i, 1);
                 break;
             }
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18514
Author:   dthakkar@adobe.com
Date:     2010-11-10T00:38:39.528767Z

Log Message:
-----------
QE notes: Some testcases in spark formatters are failing because of behavior change. These testcases are excluded prior to submission. Globalization QE team has been informed about this.
Doc notes: Spark Formatters ASDocs are updated and also added samples for the spark formatters.
Bugs: SDK-28145, SDK-28345 ,SDK-28320 ,SDK-28287,SDK-28314
Reviewer: Gordon , Craig, Masa, Xie
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/MatchingCollatorExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/NumberValidatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/CurrencyValidatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/NumberValidatorTests.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/CurrencyValidatorTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/NumberFormatterExample1.mxml</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/CurrencyFormatterExample1.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/bundles/en_US/validators.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/SortingCollator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/SortingCollatorExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/StringToolsExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/IValidator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/NumberValidatorBase.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationValidatorBase.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/NumberFormatterExample2.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/CurrencyFormatterExample2.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/NumberValidator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/CurrencyValidator.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/Validator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/GlobalizationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/IFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/DateTimeFormatterExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/LastOperationStatus.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberFormatterBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/MatchingCollator.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1260865 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/formatters/IFormatter.as
+++ frameworks/projects/framework/src/mx/formatters/IFormatter.as
@@ -34,7 +34,7 @@

     /**
      *  Formats a value and returns a String
-     *  containing the new, formatted, value.
+     *  containing the new formatted value.
      *
      *  @param value Value to be formatted.
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 5647
Author:   pfarland@adobe.com
Date:     2009-03-27T13:59:54.760468Z

Log Message:
-----------
Fixing programmatic usages of 'mx.components' to the spark equivalent after the rename.

Also fixing calls to StyleManager.getStyleDeclaration() that use an unqualified type name. Type selectors should be referenced via fully qualified ActionScript class names at runtime. When compatibility version is set to 3, getStyleDeclaration will remove the package name to match type selectors in the legacy unqualified manner.

QE: This fixes bug SDK-20253, and potentially a few other edge cases like the CursorManager RTE.
Doc: No
Checkintests: Pass

Bugs:
SDK-20253 - [rename_work] Spark RadioButton and CheckBox focus ring now highlights the label of the RadioButton

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/printing/FlexPrintJob.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/haloclassic/src/haloclassic/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1262170 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/printing/FlexPrintJob.as
+++ frameworks/projects/framework/src/mx/printing/FlexPrintJob.as
@@ -249,7 +249,7 @@
         var appExplicitWidth:Number;
         var appExplicitHeight:Number;
         var applicationClass:Class = Class(obj.systemManager.getDefinitionByName("mx.core::Application"));
-        var fxApplicationClass:Class = Class(obj.systemManager.getDefinitionByName("mx.components::FxApplication"));
+        var fxApplicationClass:Class = Class(obj.systemManager.getDefinitionByName("spark.components::Application"));

         if ((applicationClass && obj is applicationClass) ||
             (fxApplicationClass && obj is fxApplicationClass))


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1279892 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/PopUpAnchor.as
+++ frameworks/projects/spark/src/spark/components/PopUpAnchor.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package spark.components
 {