Transferred from the Adobe Open Source Subversion Repository

Revision: 9358
Author:   dsubrama@adobe.com
Date:     2009-08-17T23:51:20.104007Z

Log Message:
-----------
More work to support FXG 2.0 in the MXML Graphics library.

1. Switch blendMode default from layer to normal. Before, we did some trickery under the covers, where even though the default blendMode was layer, we actually only set it to layer when it resulted in a rendering difference (ie: when alpha was > 0 < 1 and other overlapping cases). Now, FXG 2.0 mandates blendMode default is normal – and we don’t have to do that trickery because the FXG exporters are smarter and will set blendMode explicitly to layer when necessary. This change is for Group and all graphic primitives.

2. I’ve added new enumerations to blendMode and maskType as well as a couple of new properties as mandated by FXG 2.0. There is additional work that needs to happen there that I’ll be doing next week.

3. I’ve renamed Group’s resizeMode enumerations from ‘normal’, ‘scale’ to ‘noScale’, ‘scale’.

4. I’ve renamed BitmapImage’s resizeMode enumerations from ‘normal’, ‘scale’, ‘repeat’ to ‘noScale’, ‘scale’, ‘repeat’. The default value for BitmapImage.resizeMode went from ‘repeat’ to ‘scale’. Additionally, BitmapImage.repeat property has now been eliminated - use resizeMode="repeat".

5. I’ve deprecated BitmapFill’s ‘repeat’ property. I’ve added a ‘resizeMode’ property to BitmapFill with the same enumerations, defaults and behavior as BitmapImage. I’ve also moved BitmapImageResizeMode from spark.primitives to mx.graphics. I’ve also renamed BitmapImageResizeMode.as to BitmapResizeMode.as (a PARB-approved rename).

QE notes:  Yes! Joan and I have cycloned numerous times and QA in on-board with the changes.
Doc notes: Yes
Bugs: Several
Reviewer: Evtim/Glenn
Tests run: Pretty much the entire mustella run for Halo and Spark components
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/StepperIncrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VScrollBarSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/primitives/examples/BitmapImageExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/GripperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/StepperDecrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MinimizeButtonSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImageResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/RestoreButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MaximizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/halo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacCloseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacMinimizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacMaximizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/MaskType.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/CloseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ScrollBarDownButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/TitleBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ComboBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/spark-air-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ScrollBarUpButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacTitleBarSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
+++ frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
@@ -196,7 +196,7 @@
 		_width = width;
 		_height = height;

-		if (resizeMode == ResizeMode.NORMAL)
+		if (resizeMode == ResizeMode.NOSCALE)
 		{
 			// Set the internal scale to 1
 			if (_layoutFeatures)


Requested fix

Requested fix


fixed null pointer error

fixed null pointer error

Change-Id: I230b675ac05fe2bd2f8ee94e5173c0093e7ad7c8

--- WeaveCore/src/weave/compiler/StandardLib.as
+++ WeaveCore/src/weave/compiler/StandardLib.as
@@ -601,7 +601,7 @@
 					throw new Error(_dateFormatter.error);
 			}
 			var date:Date = DateFormatter.parseDateString(formattedDateString);
-			if (parseAsUniversalTime)
+			if (date && parseAsUniversalTime)
 				date.setTime( date.getTime() - date.getTimezoneOffset() * _timezoneMultiplier );
 			return date;
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17330
Author:   chiedozi@adobe.com
Date:     2010-08-16T17:36:59.538425Z

Log Message:
-----------
Removed the sections functionality from ViewNavigator and refactored that logic into TabbedViewNavigator.  Updated dependent performance tests and components.
Introduced MobileApplicationBase and TabbedMobileApplication do support the tabbed use case for mobile.
Deleted SliderSkin from the framework.  All mobile skins now extend MobileSkin.

QE notes:
Doc notes:
Bugs:
Reviewer: Glenn and Ryan
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/ViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/PersistenceManager.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorSection.as" copyfrom-rev="17260" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ScriptRunner.as</path>
<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/mobilecomponents/src/spark/effects/SlideViewTransition.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/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ComponentCatalog.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorSection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedMobileApplicationSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewHistoryData.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/IPersistenceManager.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/IViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarTrackSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SliderSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/MobileApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as
@@ -1,7 +1,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
+//  Copyright 2010 Adobe Systems Incorporated
 //  All Rights Reserved.
 //
 //  NOTICE: Adobe permits you to use, modify, and distribute this file
@@ -9,6 +9,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

+// TODO (chiedozi): Make private in view nav?
 package spark.components.supportClasses
 {
 import flash.utils.IDataInput;
@@ -23,17 +24,16 @@
 use namespace mx_internal;

 /**
- *  ViewNavigatorSection is a data structure that represents a stack
- *  of Screens used by navigators.  This object consists of a vector
- *  of ScreenData objects that contain initialization properties
- *  for a screen.
+ *  The NavigationStack class is a data structure that is internally used by
+ *  ViewNavigator to track the current set of views that are being managed
+ *  by the navigator.
  *
  *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
  */
-public class ViewNavigatorSection implements IExternalizable
+public class NavigationStack implements IExternalizable
 {

     //--------------------------------------------------------------------------
@@ -47,10 +47,10 @@
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function ViewNavigatorSection()
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function NavigationStack()
     {
         super();

@@ -66,7 +66,20 @@
     /**
      *  @private
      */
-    mx_internal var _source:Vector.<ViewHistoryData>;
+    private var _source:Vector.<ViewHistoryData>;
+
+    /**
+     *  @private
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    mx_internal function get source():Vector.<ViewHistoryData>
+    {
+        return _source;
+    }

     //--------------------------------------------------------------------------
     //
@@ -75,85 +88,75 @@
     //--------------------------------------------------------------------------

     //----------------------------------
+    //  firstView
+    //----------------------------------
+
+    /**
+     *  The class name of the first view that should be created when a navigator
+     *  initializes itself.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public var firstView:Class;
+
+    //----------------------------------
+    //  firstViewData
+    //----------------------------------
+
+    /**
+     *  This is the initialization data to pass to the first view that is created
+     *  by a navigator.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public var firstViewData:Object;
+
+    //----------------------------------
     //  icon
     //----------------------------------
-    /**
-     *  @private
-     */
-    private var _icon:Class;

     /**
      *  Returns the icon that should be used when this stack is represented
      *  by a visual component.
-     */
-    public function get icon():Class
-    {
-        return _icon;
-    }
-    /**
-     *  @private
-     */
-    public function set icon(value:Class):void
-    {
-        _icon = value;
-    }
-
-    //----------------------------------
-    //  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;
-    }
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public var icon:Class;

     //----------------------------------
     //  label
     //----------------------------------
-    /**
-     *  @private
-     */
-    private var _label:String;
-
-    /**
-     *  The label to be used when this stack is represented by
-     *  a visual component.
-     */
-    public function get label():String
-    {
-        return _label;
-    }
-
-    /**
-     *  @private
-     */
-    public function set label(value:String):void
-    {
-        _label = value;
-    }
+
+    /**
+     *  The label to be used when this stack is represented by a visual component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public var label:String;

     //----------------------------------
     //  length
     //----------------------------------

     /**
-     *  Returns the length of the stack
+     *  Returns the length of the stack.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get length():int
     {
@@ -161,39 +164,19 @@
     }

     //----------------------------------
-    //  firstView
-    //----------------------------------
-    /**
-     *  @private
-     *  The backing variable for the firstView property.
-     */
-    private var _firstView:Class;
-
-    /**
-     *  This property is the object to use to initialize the root screen
-     *  of the stack.  This can be a Class, instance or Factory that creates
-     *  an object that extends Screen.
-     */
-    public function get firstView():Class
-    {
-        return _firstView;
-    }
-
-    /**
-     * @private
-     */
-    public function set firstView(value:Class):void
-    {
-        _firstView = value;
-    }
-
-    //----------------------------------
     //  top
     //----------------------------------

     /**
-     *  Returns the object at the top of the stack.  If the
-     *  stack is empty, this propety is null.
+     *  Returns the object at the top of the stack.  If the stack is empty,
+     *  this propety is null.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     mx_internal function get topView():ViewHistoryData
     {
@@ -208,6 +191,11 @@

     /**
      *  Clears the entire stack.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function clear():void
     {
@@ -215,23 +203,48 @@
     }

     /**
-     *  Pushes a data on the top of the stack.
-     */
-    public function push(factory:Class, data:Object):void
-    {
-        _source.push(new ViewHistoryData(factory, data));
-    }
-
-    /**
-     *  Removes the top item off the stack.
-     */
-    public function pop():void
-    {
-        _source.pop();
-    }
-
-    /**
-     *  Removes all but the root object from the screen stack.
+     *  Adds a view to the top of the navigation stack.
+     *
+     *  @param factory The class of the View to create.
+     *  @param data The data object to pass to the view when it is created
+     *
+     *  @return The data structure that represents the current view.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function push(factory:Class, data:Object):ViewHistoryData
+    {
+        var viewData:ViewHistoryData = new ViewHistoryData(factory, data);
+        _source.push(viewData);
+
+        return viewData;
+    }
+
+    /**
+     *  Removes the top view off the stack.
+     *
+     *  @return The data structure that represented the View.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function pop():ViewHistoryData
+    {
+        return _source.pop();
+    }
+
+    /**
+     *  Removes all but the root object from the navigation stack.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function popToFirstView():void
     {
@@ -245,21 +258,51 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  Serializes the navigation stack in an IDataOutput object so that it
+     *  can be written to a shared object.
+     *
+     *  @param output The data output object used to write the data.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
     public function writeExternal(output:IDataOutput):void
     {
+        // The write order must always match the read order.  Make sure that
+        // writeExternal() and readExternal() process properties in the same order.
         output.writeObject(firstViewData);
         output.writeObject(label);
         output.writeObject(_source);
+
+        // Can't store class names in a shared object, need to save the
+        // class name instead.
         output.writeObject(getQualifiedClassName(icon));
         output.writeObject(getQualifiedClassName(firstView));
     }

+    /**
+     *  Deserializes the navigation stack when being loaded from a shared
+     *  object.
+     *
+     *  @param input The external object to read from.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
     public function readExternal(input:IDataInput):void
     {
+        // The write order must always match the read order.  Make sure that
+        // writeExternal() and readExternal() process properties in the same order.
         firstViewData = input.readObject();
         label = input.readObject();
         _source = input.readObject() as Vector.<ViewHistoryData>;

+        // Need to get the class names from the saved strings.
         var className:String = input.readObject();
         icon = (className == "null") ? null : getDefinitionByName(className) as Class;


Giving RectUtil function params some decorated names now there are no types for guidance

--- raw/src/org/yellcorp/lib/geom/RectUtil.as
+++ raw/src/org/yellcorp/lib/geom/RectUtil.as
@@ -16,22 +16,28 @@
     /**
      * Multiplies each coordinate in a rectangle by a scalar value.
      *
-     * @param rect    The rectangle-like object to scale.
-     * @param factor  The number to multiply by.
-     * @param out     An optional instance to store the result in.  If not
-     *                provided, a new Rectangle is created.
-     *
-     * @return  The object containing the multiplied rectangle.
+     * @param rect
+     * The rectangle-like object to scale.
+     *
+     * @param factor
+     * The factor to scale by.
+     *
+     * @param outRect
+     * An optional instance to store the result in.  If not provided, a new
+     * Rectangle is created.
+     *
+     * @return
+     * The object containing the scaled rectangle.
      */
     public static function multiply(
-        rect:*, factor:Number, out:* = null):*
-    {
-        if (!out) out = new Rectangle();
-        out.x = rect.x * factor;
-        out.y = rect.y * factor;
-        out.width = rect.width * factor;
-        out.height = rect.height * factor;
-        return out;
+        rect:*, factor:Number, outRect:* = null):*
+    {
+        if (!outRect) outRect = new Rectangle();
+        outRect.x = rect.x * factor;
+        outRect.y = rect.y * factor;
+        outRect.width = rect.width * factor;
+        outRect.height = rect.height * factor;
+        return outRect;
     }

@@ -41,32 +47,44 @@
      * with the restriction that its b and c
      * properties are fixed at zero.
      *
-     * @param rect     The rectangle-like object to transform.
-     * @param xFactor  The number to multiply the x and width by.  This is
-     *                 equivalent to a Matrix's a property.
-     * @param yFactor  The number to multiply the y and height by.  This is
-     *                 equivalent to a Matrix's d property.
-     * @param xOffset  The number to add to the resultant x.  This is
-     *                 equivalent to a Matrix's tx property.
-     * @param yOffset  The number to add to the resultant y.  This is
-     *                 equivalent to a Matrix's ty property.
-     * @param out      An optional instance to store the result in.  If not
-     *                 provided, a new Rectangle is created.
-     *
-     * @return  The object containing the transformed rectangle.
+     * @param rect
+     * The rectangle-like object to transform.
+     *
+     * @param xFactor
+     * The number to multiply the x and width by.  This is equivalent to a
+     * Matrix's a property.
+     *
+     * @param yFactor
+     * The number to multiply the y and height by.  This is equivalent to a
+     * Matrix's d property.
+     *
+     * @param xOffset
+     * The number to add to the resultant x.  This is equivalent to a Matrix's
+     * tx property.
+     *
+     * @param yOffset
+     * The number to add to the resultant y.  This is equivalent to a Matrix's
+     * ty property.
+     *
+     * @param outRect
+     * An optional instance to store the result in.  If not provided, a new
+     * Rectangle is created.
+     *
+     * @return
+     * The object containing the transformed rectangle.
      */
     public static function transform(
         rect:*,
         xFactor:Number, yFactor:Number,
         xOffset:Number, yOffset:Number,
-        out:* = null):*
-    {
-        if (!out) out = new Rectangle();
-        out.x = rect.x * xFactor + xOffset;
-        out.y = rect.y * yFactor + yOffset;
-        out.width = rect.width * xFactor;
-        out.height = rect.height * yFactor;
-        return out;
+        outRect:* = null):*
+    {
+        if (!outRect) outRect = new Rectangle();
+        outRect.x = rect.x * xFactor + xOffset;
+        outRect.y = rect.y * yFactor + yOffset;
+        outRect.width = rect.width * xFactor;
+        outRect.height = rect.height * yFactor;
+        return outRect;
     }

@@ -74,43 +92,53 @@
      * Scales a source rectangle to fit or fill a target rectangle, maintaining
      * the source rectangle's aspect ratio.
      *
-     * @param source   The source rectangle.
-     * @param target   The rectangle to fit source into.
-     * @param mode     Calculation mode: INSIDE calculating a
-     *                 result that fits entirely within the target rectangle,
-     *                 OUTSIDE calculating a result that covers
-     *                 the entirety of the target rectangle.
-     * @param xAlign   X alignment. A number from 0 to 1. 0 aligns left
-     *                 edges, 1 aligns right edges, and 0.5 centres
-     *                 horizontally. Other values interpolate between these
-     *                 values.
-     * @param yAlign   Y alignment. A number from 0 to 1. 0 aligns top
-     *                 edges, 1 aligns bottom edges, and 0.5 centres
-     *                 vertically. Other values interpolate between these
-     *                 values.
-     * @param rounding Rounds the calculated values of x,
-     *                 y, width and
-     *                 height to the nearest whole number.
-     * @param out      An optional instance to store the result in.  If not
-     *                 provided, a new Rectangle is created.
-     *
-     * @return  The object containing the result of fitting source
-     *          to target.
-     */
-    public static function fit(source:*, target:*,
-                                   fitMode:String,
-                                   xAlign:Number = 0.5,
-                                   yAlign:Number = 0.5,
-                                   rounding:Boolean = false,
-                                   out:* = null):*
+     * @param sourceRect
+     * The source rectangle.
+     *
+     * @param targetRect
+     * The rectangle to fit sourceRect into.
+     *
+     * @param mode
+     * Fit mode. FitMode.INSIDE returns a rectangle that
+     * fits entirely within the target rectangle, FitMode.OUTSIDE
+     * returns a rectangle that covers the entirety of the target rectangle.
+     *
+     * @param xAlign
+     * X alignment. A number from 0 to 1. 0 aligns left edges, 1 aligns right
+     * edges, and 0.5 centres horizontally. Other values interpolate between
+     * these values.
+     *
+     * @param yAlign
+     * Y alignment. A number from 0 to 1. 0 aligns top edges, 1 aligns bottom
+     * edges, and 0.5 centres vertically. Other values interpolate between
+     * these values.
+     *
+     * @param rounding
+     * Rounds the calculated values of x, y,
+     * width and height to the nearest whole number.
+     *
+     * @param outRect
+     * An optional instance to store the result in.  If not provided, a new
+     * Rectangle is created.
+     *
+     * @return
+     * The object containing the result of fitting sourceRect to
+     * targetRect.
+     */
+    public static function fit(
+        sourceRect:*, targetRect:*,
+        fitMode:String,
+        xAlign:Number = 0.5, yAlign:Number = 0.5,
+        rounding:Boolean = false,
+        outRect:* = null):*
     {
         // copy values to guard against aliasing
-        var sw:Number = source.width, sh:Number = source.height;
-        var tw:Number = target.width, th:Number = target.height;
+        var sw:Number = sourceRect.width, sh:Number = sourceRect.height;
+        var tw:Number = targetRect.width, th:Number = targetRect.height;

         var scale:Number;

-        if (!out) out = new Rectangle();
+        if (!outRect) outRect = new Rectangle();

         if (fitMode == FitMode.OUTSIDE)
         {
@@ -123,108 +151,123 @@

         if (rounding)
         {
-            out.width =  int(.5 + sw * scale);
-            out.height = int(.5 + sh * scale);
+            outRect.width =  int(.5 + sw * scale);
+            outRect.height = int(.5 + sh * scale);
         }
         else
         {
-            out.width = sw * scale;
-            out.height = sh * scale;
+            outRect.width = sw * scale;
+            outRect.height = sh * scale;
         }
-        align(out, xAlign, yAlign, target, xAlign, yAlign, out);
+        align(outRect, xAlign, yAlign, targetRect, xAlign, yAlign, outRect);
         if (rounding)
         {
-            out.x = int(.5 + out.x);
-            out.y = int(.5 + out.y);
+            outRect.x = int(.5 + outRect.x);
+            outRect.y = int(.5 + outRect.y);
         }
-        return out;
+        return outRect;
     }

     /**
      * Aligns one rectangle-like object to another so that a specified
-     * normalised point in each coincide.
+     * normalised point in each coincide.  A normalised point in a rectangle is
+     * one on a scale from (0, 0) representing the top-left corner, to (1, 1)
+     * representing the bottom-right.
      *
      * @example
-     * A rectangle-like object is one that has numeric x, y, width and height
-     * properties.  A normalised point in a rectangle is one on a scale from
-     * (0, 0) representing the top-left corner, to (1, 1) representing the
-     * bottom-right.
-     *
-     * This aligns the object nextButton's left edge to the prevButton's
-     * right, and centres them vertically, and places the new x, y coordinates
-     * in nextButton, moving it.
+     * This calculates the x and y coordinates necessary to align nextButton's
+     * left edge to the prevButton's right, and centre them vertically. Because
+     * nextButton is also specified as the outRect parameter, the result is
+     * placed in its x and y properties, effectively moving it to its new
+     * position.
      * <listing version="3.0">
      * FitUtil.align(nextButton, 0, 0.5, prevButton, 1, 0.5, nextButton);
      * </listing>
      *
      * This returns a copy of canvas's scrollRect property, aligned to the
-     * bottom-right corner of canvasBounds.  Because no out variable is passed,
-     * a new Rectangle is created and returned.
+     * bottom-right corner of canvasBounds.  Because no outRect variable is
+     * passed, a new Rectangle is created and returned.
      * <listing version="3.0">
-     * FitUtil.align(canvas.scrollRect, 1, 1, canvasBounds, 1, 1);
+     * var bottomRight:Rectangle = FitUtil.align(canvas.scrollRect, 1, 1, canvasBounds, 1, 1);
      * </listing>
      *
-     * @param source       The rectangle-like object to place.
-     * @param sourceNormX  The normalized X coordinate of the source reference
-     *                     point.
-     * @param sourceNormY  The normalized Y coordinate of the source reference
-     *                     point.
-     * @param target       The rectangle-like object to use as reference.
-     * @param targetNormX  The normalized X coordinate of the source reference
-     *                     point.
-     * @param targetNormY  The normalized Y coordinate of the source reference
-     *                     point.
-     * @param out          An object in which to place source's width and
-     *                     height, along with the calculated x and y.  If not
-     *                     specified, a new Rectangle will be created and
-     *                     returned.
-     *
-     * @return  The object containing the repositioned source
-     *          rectangle.
+     * This does the same, but places the result into a new dynamic Object.
+     * <listing version="3.0">
+     * var bottomRight:Object = FitUtil.align(canvas.scrollRect, 1, 1, canvasBounds, 1, 1, { });
+     * </listing>
+     *
+     * @param sourceRect
+     * The rectangle-like object to place.
+     *
+     * @param sourceNormX
+     * The normalized X coordinate of the source reference point.
+     *
+     * @param sourceNormY
+     * The normalized Y coordinate of the source reference point.
+     *
+     * @param targetRect
+     * The rectangle-like object to use as reference.
+     *
+     * @param targetNormX
+     * The normalized X coordinate of the source reference point.
+     *
+     * @param targetNormY
+     * The normalized Y coordinate of the source reference point.
+     *
+     * @param outRect
+     * An object in which to place source's width and height, along with the
+     * calculated x and y.  If not specified, a new Rectangle will be created
+     * and returned.
+     *
+     * @return
+     * The object containing the repositioned sourceRect rectangle.
      */
     public static function align(
-        source:*, sourceNormX:Number, sourceNormY:Number,
-        target:*, targetNormX:Number, targetNormY:Number,
-        out:* = null):*
-    {
-        if (!out) out = new Rectangle();
-        out.x = target.x + targetNormX * target.width - sourceNormX * source.width;
-        out.y = target.y + targetNormY * target.height - sourceNormY * source.height;
-        out.width = source.width;
-        out.height = source.height;
-        return out;
+        sourceRect:*, sourceNormX:Number, sourceNormY:Number,
+        targetRect:*, targetNormX:Number, targetNormY:Number,
+        outRect:* = null):*
+    {
+        if (!outRect) outRect = new Rectangle();
+        outRect.x = targetRect.x + targetNormX * targetRect.width - sourceNormX * sourceRect.width;
+        outRect.y = targetRect.y + targetNormY * targetRect.height - sourceNormY * sourceRect.height;
+        outRect.width = sourceRect.width;
+        outRect.height = sourceRect.height;
+        return outRect;
     }

     /**
      * Returns the matrix required to transform one rectange to another.
      *
-     * @param source    The source rectangle.  The returned matrix, when
-     *                  applied to this rectangle, will produce a rectangle
-     *                  equal to the target rectangle.
-     * @param target    The target rectangle.
-     * @param out       A Matrix instance in which to store the
-     *                  result. If not specified, a new Matrix will be
-     *                  created and returned.
-     *
-     * @return  The object containing the calculated Matrix.
+     * @param sourceRect
+     * The source rectangle.  The returned matrix, when applied to this
+     * rectangle, will produce a rectangle equal to the target rectangle.
+     *
+     * @param target
+     * The target rectangle.
+     *
+     * @param out
+     * A Matrix instance in which to store the result. If not specified, a new
+     * Matrix will be created and returned.
+     *
+     * @return
+     * The object containing the calculated Matrix.
      */
     public static function getTransform(
-        source:*, target:*,
-        out:Matrix = null):Matrix
-    {
-        if (source.width == 0 || source.height == 0) return null;
-        if (!out) out = new Matrix();
-
-        out.tx = target.x - source.x;
-        out.ty = target.y - source.y;
-        out.a = target.width / source.width;
-        out.b =
-        out.c = 0;
-        out.d = target.height / source.height;
-
-        return out;
+        sourceRect:*, targetRect:*, outMatrix:Matrix = null):Matrix
+    {
+        if (sourceRect.width == 0 || sourceRect.height == 0) return null;
+        if (!outMatrix) outMatrix = new Matrix();
+
+        outMatrix.tx = targetRect.x - sourceRect.x;
+        outMatrix.ty = targetRect.y - sourceRect.y;
+        outMatrix.a = targetRect.width / sourceRect.width;
+        outMatrix.b =
+        outMatrix.c = 0;
+        outMatrix.d = targetRect.height / sourceRect.height;
+
+        return outMatrix;
     }

@@ -233,25 +276,29 @@
      * center.  The result is the smallest rectangle with integral coordinates
      * that can entirely contain the input rectangle.
      *
-     * @param rect    The rectangle-like object to round.
-     * @param out     An optional instance to store the result in.  If not
-     *                provided, a new Rectangle is created.
-     *
-     * @return  The object containing the rectangle with integral coordinates.
+     * @param rect
+     * The rectangle-like object to round.
+     *
+     * @param outRect
+     * An optional instance to store the result in.  If not provided, a new
+     * Rectangle is created.
+     *
+     * @return
+     * The object containing the rectangle with integral coordinates.
      */
     public static function roundOut(
-        rect:*, out:* = null):*
-    {
-        if (!out) out = new Rectangle();
+        rect:*, outRect:* = null):*
+    {
+        if (!outRect) outRect = new Rectangle();

         var r:Number = rect.x + rect.width;
         var b:Number = rect.y + rect.height;

-        out.x = Math.floor(rect.x);
-        out.y = Math.floor(rect.y);
-        out.width = Math.ceil(r) - out.x;
-        out.height = Math.ceil(b) - out.y;
-        return out;
+        outRect.x = Math.floor(rect.x);
+        outRect.y = Math.floor(rect.y);
+        outRect.width = Math.ceil(r) - outRect.x;
+        outRect.height = Math.ceil(b) - outRect.y;
+        return outRect;
     }

@@ -260,97 +307,122 @@
      * center.  The result is the largest rectangle with integral coordinates
      * that can fit entirely within the input rectangle.
      *
-     * @param rect    The rectangle-like object to round.
-     * @param out     An optional instance to store the result in.  If not
-     *                provided, a new Rectangle is created.
-     *
-     * @return  The object containing the rectangle with integral coordinates.
+     * @param rect
+     * The rectangle-like object to round.
+     *
+     * @param outRect
+     * An optional instance to store the result in.  If not provided, a new
+     * Rectangle is created.
+     *
+     * @return
+     * The object containing the rectangle with integral coordinates.
      */
     public static function roundIn(
-        rect:*, out:* = null):*
-    {
-        if (!out) out = new Rectangle();
+        rect:*, outRect:* = null):*
+    {
+        if (!outRect) outRect = new Rectangle();

         var r:Number = rect.x + rect.width;
         var b:Number = rect.y + rect.height;

-        out.x = Math.ceil(rect.x);
-        out.y = Math.ceil(rect.y);
-        out.width = Math.floor(r) - out.x;
-        out.height = Math.floor(b) - out.y;
-        return out;
+        outRect.x = Math.ceil(rect.x);
+        outRect.y = Math.ceil(rect.y);
+        outRect.width = Math.floor(r) - outRect.x;
+        outRect.height = Math.floor(b) - outRect.y;
+        return outRect;
     }

     /**
      * Maps a point from one rectangle space to another.
      *
-     * @param point   The input point.
-     * @param source  The source rectangle space.
-     * @param target  The target rectangle space.
-     * @param out     An optional instance to store the result in.  If not
-     *                provided, a new Point is created.
-     *
-     * @return  The object containing the mapped point.
-     */
-    public static function mapPoint(point:*,
-        source:*, target:*, out:* = null):*
-    {
-        if (!out) out = new Rectangle();
-        out.x = target.x + target.width * (point.x - source.x) / source.width;
-        out.y = target.y + target.height * (point.y - source.y) / source.height;
-        return out;
+     * @param point
+     * The input point.
+     *
+     * @param sourceRect
+     * The source rectangle space.
+     *
+     * @param targetRect
+     * The target rectangle space.
+     *
+     * @param outPoint
+     * An optional instance to store the result in.  If not provided, a new
+     * Point is created.
+     *
+     * @return
+     * The object containing the mapped point.
+     */
+    public static function mapPoint(
+        point:*, sourceRect:*, targetRect:*, outPoint:* = null):*
+    {
+        if (!outPoint) outPoint = new Rectangle();
+        outPoint.x = targetRect.x + targetRect.width * (point.x - sourceRect.x) / sourceRect.width;
+        outPoint.y = targetRect.y + targetRect.height * (point.y - sourceRect.y) / sourceRect.height;
+        return outPoint;
     }

     /**
      * Maps a rectangle from one rectangle space to another.
      *
-     * @param rect    The input rectangle.
-     * @param source  The source rectangle space.
-     * @param target  The target rectangle space.
-     * @param out     An optional instance to store the result in.  If not
-     *                provided, a new Rectangle is created.
+     * @param rect
+     * The input rectangle.
+     *
+     * @param sourceRect
+     * The source rectangle space.
+     *
+     * @param targetRect
+     * The target rectangle space.
+     *
+     * @param outRect
+     * An optional instance to store the result in.  If not provided, a new
+     * Rectangle is created.
      *
      * @return  The object containing the mapped rectangle.
      */
     public static function mapRect(
-        rect:*, source:*, target:*, out:* = null):*
-    {
-        if (!out) out = new Rectangle();
-        out.x = target.x + target.width * (rect.x - source.x) / source.width;
-        out.y = target.y + target.height * (rect.y - source.y) / source.height;
-        out.width = target.width * (rect.x + rect.width - source.x) / source.width;
-        out.height = target.height * (rect.y + rect.height - source.y) / source.height;
-        return out;
-    }
-
-
-    /**
-     * Restricts the range of a point's x and y coordinates so the point falls
-     * with a given rectangle.
-     *
-     * @param point  The point to limit.
-     * @param rect   The rectangular limit.
-     * @param out    An optional instance to store the result in.  If not
-     *               provided, a new Point is created.
-     *
-     * @return  The object containing the clamped point.
+        rect:*, sourceRect:*, targetRect:*, outRect:* = null):*
+    {
+        if (!outRect) outRect = new Rectangle();
+        outRect.x = targetRect.x + targetRect.width * (rect.x - sourceRect.x) / sourceRect.width;
+        outRect.y = targetRect.y + targetRect.height * (rect.y - sourceRect.y) / sourceRect.height;
+        outRect.width = targetRect.width * (rect.x + rect.width - sourceRect.x) / sourceRect.width;
+        outRect.height = targetRect.height * (rect.y + rect.height - sourceRect.y) / sourceRect.height;
+        return outRect;
+    }
+
+
+    /**
+     * Returns a point that is repositioned, if necessary, so that its location
+     * is contained within a rectangle.
+     *
+     * @param point
+     * The point to limit.
+     *
+     * @param rect
+     * The rectangular limit.
+     *
+     * @param outPoint
+     * An optional instance to store the result in.  If not provided, a new
+     * Point is created.
+     *
+     * @return
+     * The object containing the clamped point.
      */
     public static function clampPoint(
-        point:*, rect:*, out:* = null):*
-    {
-        if (!out) out = new Point();
-
-        if (point.x < rect.x)  {  out.x = rect.x;  }
-        else if (point.x > rect.x + rect.width)  {  out.x = rect.x + rect.width;  }
-        else  {  out.x = point.x;  }
-
-        if (point.y < rect.y)  {  out.y = rect.y;  }
-        else if (point.y > rect.y + rect.height)  {  out.y = rect.y + rect.height;  }
-        else  {  out.y = point.y;  }
-
-        return out;
+        point:*, rect:*, outPoint:* = null):*
+    {
+        if (!outPoint) outPoint = new Point();
+
+        if (point.x < rect.x)  {  outPoint.x = rect.x;  }
+        else if (point.x > rect.x + rect.width)  {  outPoint.x = rect.x + rect.width;  }
+        else  {  outPoint.x = point.x;  }
+
+        if (point.y < rect.y)  {  outPoint.y = rect.y;  }
+        else if (point.y > rect.y + rect.height)  {  outPoint.y = rect.y + rect.height;  }
+        else  {  outPoint.y = point.y;  }
+
+        return outPoint;
     }

@@ -359,23 +431,29 @@
      * (0, 0) representing the rectangle's top-left corner, to (1, 1)
      * representing the bottom-right.
      *
-     * @param rect   The input rectangle.
-     * @param xParam The X parameter, with 0 representing the rectangle's left,
-     *               1 the right.
-     * @param yParam The Y parameter, with 0 representing the rectangle's top,
-     *               1 the bottom.
-     * @param out    An optional instance to store the result in.  If not
-     *               provided, a new Point is created.
-     *
-     * @return  The object containing the point.
+     * @param rect
+     * The input rectangle.
+     *
+     * @param xParam
+     * The X parameter, with 0 representing the rectangle's left, 1 the right.
+     *
+     * @param yParam
+     * The Y parameter, with 0 representing the rectangle's top, 1 the bottom.
+     *
+     * @param outPoint
+     * An optional instance to store the result in.  If not provided, a new
+     * Point is created.
+     *
+     * @return
+     * The object containing the point.
      */
     public static function getNormalizedPoint(
-        rect:*, xParam:Number, yParam:Number, out:* = null):*
-    {
-        if (!out) out = new Point();
-        out.x = rect.x + xParam * rect.width;
-        out.y = rect.y + yParam * rect.height;
-        return out;
+        rect:*, xParam:Number, yParam:Number, outPoint:* = null):*
+    {
+        if (!outPoint) outPoint = new Point();
+        outPoint.x = rect.x + xParam * rect.width;
+        outPoint.y = rect.y + yParam * rect.height;
+        return outPoint;
     }

@@ -383,23 +461,29 @@
      * Scales a rectangle to have a specified area, maintaining its aspect
      * ratio.
      *
-     * @param rect  The rectangle to scale.
-     * @param area  The desired area.
-     * @param out   An optional instance to store the result in.  If not
-     *              provided, a new Rectangle is created.
-     *
-     * @return  The object containing the rectangle with the desired area.
+     * @param rect
+     * The rectangle to scale.
+     *
+     * @param area
+     * The desired area.
+     *
+     * @param outRect
+     * An optional instance to store the result in.  If not provided, a new
+     * Rectangle is created.
+     *
+     * @return
+     * The object containing the rectangle with the desired area.
      */
     public static function scaleToArea(
-        rect:*, area:Number, out:* = null):*
-    {
-        if (!out) out = new Rectangle();
+        rect:*, area:Number, outRect:* = null):*
+    {
+        if (!outRect) outRect = new Rectangle();
         var areaRatio:Number = Math.sqrt(area / (rect.width * rect.height));
-        out.x = rect.x;
-        out.y = rect.y;
-        out.width = rect.width * areaRatio;
-        out.height = rect.height * areaRatio;
-        return out;
+        outRect.x = rect.x;
+        outRect.y = rect.y;
+        outRect.width = rect.width * areaRatio;
+        outRect.height = rect.height * areaRatio;
+        return outRect;
     }
 }
 }


Completed return_of_the_rtmfpcat client side code, works

--- return_of_the_rtmfpcat.as
+++ return_of_the_rtmfpcat.as
@@ -76,6 +76,9 @@
         /* Cirrus connection timeout ID. */
         private var circon_timeo_id:int;

+        /* Array of connection pairs */
+        private var con_pairs:Array;
+
         /* Put a string to the screen. */
         public function puts(s:String):void
         {
@@ -175,6 +178,19 @@
                 puts("circon_netstatus_event: NetConnection.Connect.Success");
                 puts("Got id " + circon.nearID + ".");
                 clearInterval(circon_timeo_id);
+
+                if(proxy_mode) {
+
+                } else {
+                    /* Listen for incoming RTMFP connections. */
+                    var s_r:RTMFPSocket = new RTMFPSocket(circon);
+                    s_r.addEventListener(Event.CONNECT, rtmfp_connect_event);
+                    s_r.listen();
+
+                    /* Register ID with facilitator. */
+                    register_id(circon.nearID, fac_addr);
+                }
+
                 break;
             case "NetStream.Connect.Success" :
                 puts("circon_netstatus_event: NetStream.Connect.Success");
@@ -191,6 +207,32 @@
             }
         }

+        private function rtmfp_connect_event(e:Event):void
+        {
+           puts("VICTORY!");
+        }
+
+        private function register_id(id:String, fac_addr:Object):void
+        {
+            var s_f:Socket = new Socket();
+            s_f.addEventListener(Event.CONNECT, function (e:Event):void {
+                puts("Facilitator: connected to " + fac_addr.host + ":" + fac_addr.port + ".");
+                puts("Registering id " + id);
+                s_f.writeUTFBytes("POST / HTTP/1.0\r\n\r\nclient=" + id + "\r\n");
+            });
+            s_f.addEventListener(Event.CLOSE, function (e:Event):void {
+                puts("Facilitator: connection closed.");
+            });
+            s_f.addEventListener(IOErrorEvent.IO_ERROR, function (e:IOErrorEvent):void {
+                puts("Facilitator: I/O error: " + e.text + ".");
+            });
+            s_f.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function (e:SecurityErrorEvent):void {
+                puts("Facilitator: security error: " + e.text + ".");
+            });
+
+            s_f.connect(fac_addr.host, fac_addr.port);
+        }
+
         private function circon_timeout():void
         {
             puts("Cirrus server connection timed out!");
@@ -215,3 +257,118 @@
     }
 }

+import flash.display.Sprite;
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.events.IOErrorEvent;
+import flash.events.ProgressEvent;
+import flash.events.SecurityErrorEvent;
+import flash.net.Socket;
+import flash.utils.ByteArray;
+import flash.utils.clearTimeout;
+import flash.utils.getTimer;
+import flash.utils.setTimeout;
+import flash.net.NetConnection;
+import flash.net.NetStream;
+
+class RTMFPSocket extends EventDispatcher
+{
+    /* The name of the "media" to pass between peers. */
+    private static const DATA:String = "data";
+
+    /* Connection to the Cirrus rendezvous service.
+     * RTMFPSocket is established using this service. */
+    private var circon:NetConnection;
+
+    /* Unidirectional streams composing socket. */
+    private var send_stream:NetStream;
+    private var recv_stream:NetStream;
+
+    public function RTMFPSocket(circon:NetConnection)
+    {
+        this.circon = circon;
+    }
+
+    public function listen():void
+    {
+        send_stream = new NetStream(circon, NetStream.DIRECT_CONNECTIONS);
+        var client:Object = new Object();
+        client.onPeerConnect = send_stream_peer_connect;
+        send_stream.client = client;
+        send_stream.publish(DATA);
+    }
+
+    private function send_stream_peer_connect(peer:NetStream):Boolean
+    {
+        recv_stream = new NetStream(circon, peer.farID);
+        var client:RTMFPSocketClient = new RTMFPSocketClient();
+        client.addEventListener(ProgressEvent.SOCKET_DATA, function (event:ProgressEvent):void {
+            dispatchEvent(event);
+        }, false, 0, true);
+        client.addEventListener(RTMFPSocketClient.PEER_CONNECT_ACKNOWLEDGED, function (event:Event):void {
+            dispatchEvent(new Event(Event.CONNECT));
+        }, false, 0, true);
+        recv_stream.client = client;
+        recv_stream.play(DATA);
+
+        return true;
+    }
+
+
+}
+
+dynamic class RTMFPSocketClient extends EventDispatcher
+{
+    public static const PEER_CONNECT_ACKNOWLEDGED:String = "peerConnectAcknowledged";
+
+    private var _bytes:ByteArray;
+    private var _peerID:String;
+    private var _peerConnectAcknowledged:Boolean;
+
+    public function RTMFPSocketClient()
+    {
+        super();
+        _bytes = new ByteArray();
+        _peerID = null;
+        _peerConnectAcknowledged = false;
+    }
+
+    public function get bytes():ByteArray
+    {
+        return _bytes;
+    }
+
+    public function dataAvailable(bytes:ByteArray):void
+    {
+        this._bytes.clear();
+        bytes.readBytes(this._bytes);
+        dispatchEvent(new ProgressEvent(ProgressEvent.SOCKET_DATA, false, false, this._bytes.bytesAvailable, this._bytes.length));
+    }
+
+    public function get peerConnectAcknowledged():Boolean
+    {
+        return _peerConnectAcknowledged;
+    }
+
+    public function setPeerConnectAcknowledged():void
+    {
+        _peerConnectAcknowledged = true;
+        dispatchEvent(new Event(PEER_CONNECT_ACKNOWLEDGED));
+    }
+
+    public function get peerID():String
+    {
+        return _peerID;
+    }
+
+    public function set peerID(id:String):void
+    {
+       _peerID = id;
+    }
+
+}
+
+class ConnectionPair extends EventDispatcher
+{
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 2743
Author:   jimurphy@adobe.com
Date:     2008-08-05T19:28:29.575474Z

Log Message:
-----------
Merged 3.0.x revisions [2649,2652,2670,2694,2699-2700,2713,2721-2723,2729,2731-2732] -> trunk

Modified Paths:
--------------
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerBridge.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/Configuration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/swc/SwcLibrary.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/i18n/I18nUtils.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/Compc.java</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/modules/compiler/src/java/flex2/tools/SwcChecksums.java" copyfrom-rev="2732" action="A">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/SwcChecksums.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLEncoder.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/managers/PopUpManagerImpl.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerSwcContext.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/ShowAlertRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemChildrenList.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/modules/compiler/src/java/flex2/tools/Mxmlc.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxBridgeRequest.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/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/Application.java</path>

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

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -44,6 +44,7 @@

 import mx.core.EmbeddedFontRegistry;
 import mx.core.FlexSprite;
+import mx.core.IApplicationLoader;
 import mx.core.IChildList;
 import mx.core.IFlexDisplayObject;
 import mx.core.IFlexModuleFactory;
@@ -59,7 +60,6 @@
 import mx.events.MarshalEvent;
 import mx.events.ModalWindowRequest;
 import mx.events.PopUpRequest;
-import mx.events.ShowAlertRequest;
 import mx.events.SizeRequest;
 import mx.messaging.config.LoaderConfig;
 import mx.preloaders.DownloadProgressBar;
@@ -83,7 +83,6 @@
 import mx.utils.ObjectUtil;
 import mx.utils.SandboxUtil;
 import mx.events.ResizeEvent;
-

 // NOTE: Minimize the non-Flash classes you import here.
 // Any dependencies of SystemManager have to load in frame 1,
@@ -359,8 +358,6 @@
 	 *  top-level means we are the highest level SystemManager
 	 *  for this stage.
 	 */
-	// VERSION_SKEW
-	// TODODJL: still need this? change from private to mx_internal so SystemManagerProxy can change it
 	mx_internal var topLevel:Boolean = true;

 	/**
@@ -3166,8 +3163,7 @@
 		}
 	}

-
-	/**
+ 	/**
 	 *  Override this function if you want to perform any logic
 	 *  when the application has finished initializing itself.
 	 */
@@ -3794,10 +3790,55 @@

         var request:ModalWindowRequest = ModalWindowRequest.marshal(event);

+        if (!preProcessModalWindowRequest(request, this, getSandboxRoot()))
+            return;
+
         // Ensure a PopUpManager exists and dispatch the request it is
         // listening for.
         Singleton.getInstance("mx.managers::IPopUpManager");
         dispatchEvent(request);
+    }
+
+    /**
+     *  @private
+     *
+     *  Calculate the visible rectangle of the requesting application in this
+     *  application. Forward the request to our parent to see this the rectangle
+     *  is further reduced. Continue up the parent chain until the top level
+     *  root parent is reached.
+     */
+    private function getVisibleRectRequestHandler(event:Event):void
+    {
+        if (event is SandboxBridgeRequest)
+            return;
+
+        var request:SandboxBridgeRequest = SandboxBridgeRequest.marshal(event);
+        var rect:Rectangle = Rectangle(request.data);
+        var owner:DisplayObject = sandboxBridgeGroup.getChildBridgeOwner(request.requestor);
+        var localRect:Rectangle;
+
+        if (owner is IApplicationLoader)
+            localRect = IApplicationLoader(owner).getVisibleApplicationRect();
+        else
+        {
+            localRect = owner.getBounds(this);
+            var pt:Point = localToGlobal(localRect.topLeft);
+            localRect.x = pt.x;
+            localRect.y = pt.y;
+        }
+
+        rect = rect.intersection(localRect); // update rect
+        request.data = rect;
+
+        // forward request
+        if (useBridge())
+        {
+        var bridge:IEventDispatcher = sandboxBridgeGroup.parentBridge;
+            request.requestor = bridge;
+            bridge.dispatchEvent(request);
+        }
+
+        Object(event).data = request.data;           // update request
     }

 	//--------------------------------------------------------------------------
@@ -4205,6 +4246,12 @@
 			break;
 		case "application":
 		    event["value"] = application;
+		    break;
+		case "isTopLevelRoot":
+		    event["value"] = isTopLevelRoot();
+		    break;
+	    case "getVisibleApplicationRect":
+	        event["value"] = getVisibleApplicationRect();
 		}
 	}

@@ -4297,7 +4344,7 @@
 	 * The system manager proxy has only one child that is a focus manager container.
 	 * Iterate thru the children until we find it.
 	 */
-	private function findFocusManagerContainer(smp:SystemManagerProxy):IFocusManagerContainer
+	mx_internal function findFocusManagerContainer(smp:SystemManagerProxy):IFocusManagerContainer
 	{
 		var children:IChildList = smp.rawChildren;
 		var numChildren:int = children.numChildren;
@@ -4348,6 +4395,7 @@
         bridge.addEventListener(ModalWindowRequest.CREATE, modalWindowRequestHandler);
         bridge.addEventListener(ModalWindowRequest.SHOW, modalWindowRequestHandler);
         bridge.addEventListener(ModalWindowRequest.HIDE, modalWindowRequestHandler);
+        bridge.addEventListener(SandboxBridgeRequest.GET_VISIBLE_RECT, getVisibleRectRequestHandler);
 	}

 	/**
@@ -4375,6 +4423,7 @@
         bridge.removeEventListener(ModalWindowRequest.CREATE, modalWindowRequestHandler);
         bridge.removeEventListener(ModalWindowRequest.SHOW, modalWindowRequestHandler);
         bridge.removeEventListener(ModalWindowRequest.HIDE, modalWindowRequestHandler);
+        bridge.removeEventListener(SandboxBridgeRequest.GET_VISIBLE_RECT, getVisibleRectRequestHandler);
 	}

 	/**
@@ -4629,6 +4678,39 @@
 		return lastParent != null ? lastParent : DisplayObject(sm);
 	}

+   /**
+     *  @inheritdoc
+     */
+    public function getVisibleApplicationRect(bounds:Rectangle = null):Rectangle
+    {
+        if (!bounds)
+        {
+            bounds = getBounds(DisplayObject(this));
+
+            var s:Rectangle = screen;
+            var pt:Point = new Point(bounds.x, bounds.y);
+            pt = localToGlobal(pt);
+            bounds.x = pt.x;
+            bounds.y = pt.y;
+            bounds.width = s.width;
+            bounds.height = s.height;
+        }
+
+        // send a message to parent for their visible rect.
+        if (useBridge())
+        {
+            var bridge:IEventDispatcher = sandboxBridgeGroup.parentBridge;
+            var request:SandboxBridgeRequest = new SandboxBridgeRequest(SandboxBridgeRequest.GET_VISIBLE_RECT,
+                                                                    false, false,
+                                                                    bridge,
+                                                                    bounds);
+            bridge.dispatchEvent(request);
+            bounds = Rectangle(request.data);
+        }
+
+        return bounds;
+    }
+
 	/**
 	 * @private
 	 *
@@ -4851,6 +4933,72 @@
 		// trace("<<removeEventListenerToSandboxes", this, type);
 	}

+    /**
+     *   @private
+     *
+     *   @return true if the message should be processed, false if
+     *   no other action is required.
+     */
+    private function preProcessModalWindowRequest(request:ModalWindowRequest,
+                                                  sm:ISystemManager2,
+                                                  sbRoot:DisplayObject):Boolean
+    {
+        // should we process this message?
+        if (request.skip)
+        {
+            // skipping this sandbox,
+            // but don't skip the next one.
+            request.skip = false;
+
+            if (sm.useBridge())
+            {
+                var bridge:IEventDispatcher = sm.sandboxBridgeGroup.parentBridge;
+                request.requestor = bridge;
+                bridge.dispatchEvent(request);
+            }
+            return false;
+        }
+
+        // if we are not the sandbox root, dispatch the message to the sandbox root.
+        if (sm != sbRoot)
+        {
+            var forwardRequest:Boolean = false;
+
+            // convert exclude component into a rectangle and forward to parent bridge.
+            if (request.type == ModalWindowRequest.CREATE ||
+                request.type == ModalWindowRequest.SHOW)
+            {
+                var exclude:IApplicationLoader = sm.sandboxBridgeGroup.getChildBridgeOwner(request.requestor)
+                                                 as IApplicationLoader;
+                var excludeRect:Rectangle = IApplicationLoader(exclude).getVisibleApplicationRect();
+                request.data = excludeRect;
+                forwardRequest = true;
+            }
+            else if (request.type == ModalWindowRequest.HIDE)
+                forwardRequest = true;
+
+            if (forwardRequest)
+            {
+                bridge = sm.sandboxBridgeGroup.parentBridge;
+                request.requestor = bridge;
+
+                // The HIDE request does not need to be processed by each
+                // application, so dispatch it directly to the sandbox root.
+                if (request.type == ModalWindowRequest.HIDE)
+                    sbRoot.dispatchEvent(request);
+                else
+                    bridge.dispatchEvent(request);
+                return false;
+            }
+        }
+
+        // skip aftering sending the message over a bridge.
+        request.skip = false;
+
+        return true;
+    }
+
+
 	private function sandboxMouseListener(event:Event):void
 	{
 		// trace("sandboxMouseListener", this);


Transferred from the Adobe Open Source Subversion Repository

Revision: 7910
Author:   egeorgie@adobe.com
Date:     2009-06-17T01:41:55.138890Z

Log Message:
-----------
P-ARB changes:

* IGraphicElement sharedIndex -> DisplayObjectSharingMode
* ScrollUnit -> NavigationUnit
* LayoutBase.getDestinationIndex -> LayoutBase.getNavigationDestinationIndex, param order reversed!!!!
* mouseOpaque -> mouseEnabledWhereTransparent
* various other small renames and changes to non-public APIs

Doc Notes: None
Bugs: N/A
Reviewer: Deepa
tests: checkintests

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/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/InvalidatingSprite.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IViewport.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/flex4/src/spark/components/Group.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/ScrollUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/NavigationUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/DisplayObjectSharingMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/DropDownList.as
+++ frameworks/projects/spark/src/spark/components/DropDownList.as
@@ -584,13 +584,15 @@

         if (!dropDownController.processKeyDown(event))
         {
-            var navigationUnit:uint;
+            var navigationUnit:uint = event.keyCode;
+            if (!NavigationUnit.isNavigationUnit(navigationUnit))
+                return;
+
             var proposedNewIndex:int = -1;

             if (dropDownController.isOpen)
             {
-                navigationUnit = mapEventToNavigationUnit(event);
-                proposedNewIndex = layout.getDestinationIndex(navigationUnit, proposedSelectedIndex)
+                proposedNewIndex = layout.getNavigationDestinationIndex(proposedSelectedIndex, navigationUnit);

                 if (proposedNewIndex != -1)
                 {
@@ -602,8 +604,6 @@
             }
             else if (dataProvider)
             {
-                navigationUnit = mapEventToNavigationUnit(event);
-
                 switch (navigationUnit)
                 {
                     case NavigationUnit.UP:


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@1285257 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/layouts/TileOrientation.as
+++ frameworks/projects/spark/src/spark/layouts/TileOrientation.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.layouts
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8023
Author:   aharui@adobe.com
Date:     2009-06-19T23:37:02.437061Z

Log Message:
-----------
Frame1 cleanup part 2 (final part AFAIK).  MarshallPLan (now MarshallingSupport) is now opt-in.  All SWFs using Marshalling must use -includes=mx.managers.systemClasses.MarshallingSupport on the command line.

QE Notes: None
Doc Notes: None
Bugs: N/A
Reviewer: Joan cyclone
tests: checkintests mustella/MarshallPlan

Modified Paths:
--------------
<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/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ActiveWindowManager.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallPlan.as" copyfrom-rev="7988" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallingSupport.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallPlan.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.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/framework/src/mx/managers/FocusManager.as</path>

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

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -39,7 +39,6 @@
 import mx.core.ISWFLoader;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
-import mx.managers.marshalClasses.FocusManagerMarshalMixin;
 import mx.utils.DisplayUtil;

 use namespace mx_internal;
@@ -106,11 +105,6 @@
 	 */
 	public static var mixins:Array;

-    /**
-     *  @private
-     */
-    private static function weakDependency():void { FocusManagerMarshalMixin };
-
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -191,7 +185,8 @@
 			if (awm)
         		awm.addFocusManager(container); // build a message that does the equal

-			dispatchEvent(new Event("initialize"));
+            if (hasEventListener("initialize"))
+		    	dispatchEvent(new Event("initialize"));

 		}
 		catch (e:Error)
@@ -314,7 +309,8 @@

         _showFocusIndicator = value;

-        dispatchEvent(new Event("showFocusIndicator"));
+        if (hasEventListener("showFocusIndicator"))
+            dispatchEvent(new Event("showFocusIndicator"));
     }

     //----------------------------------
@@ -578,7 +574,8 @@

         o.setFocus();

-		dispatchEvent(new Event("setFocus"));
+        if (hasEventListener("setFocus"))
+    		dispatchEvent(new Event("setFocus"));
         // trace("FM set focus");
     }

@@ -592,8 +589,9 @@
         // trace("FM " + this + " focusInHandler " + target);

 		// dispatch cancelable FocusIn to see if Marshal Plan mixin wants it
-		if (!dispatchEvent(new FocusEvent(FocusEvent.FOCUS_IN, false, true, target)))
-			return;
+        if (hasEventListener(FocusEvent.FOCUS_IN))
+    		if (!dispatchEvent(new FocusEvent(FocusEvent.FOCUS_IN, false, true, target)))
+    			return;

         if (isParent(DisplayObjectContainer(form), target))
         {
@@ -724,8 +722,8 @@
             return;
         }

-        // trace("FocusManager activating = " + this._form.systemManager.loaderInfo.url);
-        // trace("FocusManager activating " + this);
+        //trace("FocusManager activating = " + this._form.systemManager.loaderInfo.url);
+        //trace("FocusManager activating " + this);

         // listen for focus changes, use weak references for the stage
 		// form.systemManager can be null if the form is created in a sandbox and
@@ -761,7 +759,8 @@
         if (_lastFocus)
             setFocus(_lastFocus);

-		dispatchEvent(new Event("activateFM"));
+        if (hasEventListener("activateFM"))
+    		dispatchEvent(new Event("activateFM"));

     }

@@ -785,7 +784,7 @@
     public function deactivate():void
     {
         // trace("FocusManager deactivating " + this);
-        // trace("FocusManager deactivating = " + this._form.systemManager.loaderInfo.url);
+        //trace("FocusManager deactivating = " + this._form.systemManager.loaderInfo.url);

         // listen for focus changes
 		var sm:ISystemManager = form.systemManager;
@@ -816,7 +815,8 @@

         activated = false;

-		dispatchEvent(new Event("deactivateFM"));
+        if (hasEventListener("deactivateFM"))
+    		dispatchEvent(new Event("deactivateFM"));
     }

     /**
@@ -918,7 +918,7 @@
      */
     private function sortFocusableObjectsTabIndex():void
     {
-        // trace("FocusableObjectsTabIndex");
+        //trace("FocusableObjectsTabIndex");

         focusableCandidates = [];

@@ -1267,8 +1267,9 @@
 		// If we are about to wrap focus around, send focus back to the parent.
 		if (!popup && (focusInfo.wrapped || !focusInfo.displayObject))
 		{
-			if (!dispatchEvent(new FocusEvent("focusWrapping", false, true, null, event.shiftKey)))
-				return;
+            if (hasEventListener("focusWrapping"))
+	    		if (!dispatchEvent(new FocusEvent("focusWrapping", false, true, null, event.shiftKey)))
+		    		return;
 		}

 		if (!focusInfo.displayObject)
@@ -1285,8 +1286,9 @@
 		focusChanged = false;
 		if (o)
 		{
-			if (!dispatchEvent(new FocusEvent("setFocusToComponent", false, true, InteractiveObject(o), shiftKey)))
-				return;
+            if (hasEventListener("setFocusToComponent"))
+    			if (!dispatchEvent(new FocusEvent("setFocusToComponent", false, true, InteractiveObject(o), shiftKey)))
+	    			return;

 			if (o is IFocusManagerComplexComponent)
 			{
@@ -1324,8 +1326,9 @@
 		// If we are about to wrap focus around, send focus back to the parent.
 		if (!popup && focusInfo.wrapped)
 		{
-			if (!dispatchEvent(new FocusEvent("setFocusToNextIndex", false, true, null, shiftKey)))
-				return;
+            if (hasEventListener("setFocusToNextIndex"))
+    			if (!dispatchEvent(new FocusEvent("setFocusToNextIndex", false, true, null, shiftKey)))
+	    			return;
 		}

 		setFocusToComponent(focusInfo.displayObject, shiftKey);
@@ -1442,8 +1445,9 @@
                 (o is IUIComponent ? IUIComponent(o).enabled : true))
                 return o;

-			if (!dispatchEvent(new FocusEvent("getTopLevelFocusTarget", false, true, o.parent)))
-				return null;
+            if (hasEventListener("getTopLevelFocusTarget"))
+    			if (!dispatchEvent(new FocusEvent("getTopLevelFocusTarget", false, true, o.parent)))
+			    	return null;

             o = o.parent;

@@ -1719,8 +1723,9 @@

     	var sm:ISystemManager = form.systemManager;

-		if (!dispatchEvent(new FocusEvent("keyFocusChange", false, true, InteractiveObject(event.target))))
-			return;
+        if (hasEventListener("keyFocusChange"))
+    		if (!dispatchEvent(new FocusEvent("keyFocusChange", false, true, InteractiveObject(event.target))))
+	    		return;

         showFocusIndicator = true;
 		focusChanged = false;
@@ -1739,7 +1744,8 @@

                 browserFocusComponent = null;

-				dispatchEvent(new FocusEvent("browserFocusComponent", false, false, InteractiveObject(event.target)));
+                if (hasEventListener("browserFocusComponent"))
+	    			dispatchEvent(new FocusEvent("browserFocusComponent", false, false, InteractiveObject(event.target)));

                 return;
             }
@@ -1763,8 +1769,9 @@
 		// if the target is in a bridged application, let it handle the click.
 		var sm:ISystemManager = form.systemManager;

-		if (!dispatchEvent(new FocusEvent("keyDownFM", false, true, InteractiveObject(event.target))))
-   			return;
+        if (hasEventListener("keyDownFM"))
+    		if (!dispatchEvent(new FocusEvent("keyDownFM", false, true, InteractiveObject(event.target))))
+   	    		return;

         if (sm is SystemManager)
             SystemManager(sm).idleCounter = 0;
@@ -1836,8 +1843,9 @@
     private function defaultButtonKeyHandler(event:KeyboardEvent):void
     {
         var sm:ISystemManager = form.systemManager;
-		if (!dispatchEvent(new FocusEvent("defaultButtonKeyHandler", false, true)))
-			return;
+        if (hasEventListener("defaultButtonKeyHandler"))
+    		if (!dispatchEvent(new FocusEvent("defaultButtonKeyHandler", false, true)))
+	    		return;

         if (defaultButtonEnabled && event.keyCode == Keyboard.ENTER &&
             defaultButton && defButton.enabled)
@@ -1890,7 +1898,8 @@
 			// trace("FM: skipped setting focus to " + _lastFocus);
 		}

-		dispatchEvent(new FocusEvent("mouseDownFM", false, false, InteractiveObject(o)));
+        if (hasEventListener("mouseDownFM"))
+    		dispatchEvent(new FocusEvent("mouseDownFM", false, false, InteractiveObject(o)));

         lastAction = "MOUSEDOWN";


Transferred from the Adobe Open Source Subversion Repository

Revision: 13201
Author:   dloverin@adobe.com
Date:     2009-12-23T20:16:41.460357Z

Log Message:
-----------
Fix RTE when calling PopUpManager.createPopUp() from a module or sub-application.

This fix adds a moduleFactory parameter to PopUpManager.createPopUp() to allow a module or sub-application to specify the style manager to be used. Modules and sub-applications should always pass a moduleFactory to PopUpManager.createPopUp() or PopUpManager.addPopUp() to ensure the correct style manager is used when looking up styles. Otherwise the parent of the pop up is used to determine the style manager.

QE notes: Please create a PerModuleStyles test that uses the new parameter to createPopUp().
Doc notes: None.
Bugs: SDK-24835.
Reviewer: Alex
Tests run: checkintests, Managers/PopUpManager
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IPopUpManager.as</path>

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

--- frameworks/projects/framework/src/mx/managers/PopUpManager.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManager.as
@@ -118,6 +118,9 @@
      *  PopUpManagerChildList.POPUP,
      *  or PopUpManagerChildList.PARENT (default).
      *
+     *  @param moduleFactory The moduleFactory where this pop-up should look for
+     *  its embedded fonts and style manager.
+     *
      *  @return Reference to new top-level window.
      *
      *  @see PopUpManagerChildList
@@ -130,9 +133,10 @@
     public static function createPopUp(parent:DisplayObject,
                                        className:Class,
                                        modal:Boolean = false,
-                                       childList:String = null):IFlexDisplayObject
+                                       childList:String = null,
+                                       moduleFactory:IFlexModuleFactory = null):IFlexDisplayObject
     {
-		return impl.createPopUp(parent, className, modal, childList);
+		return impl.createPopUp(parent, className, modal, childList, moduleFactory);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5098
Author:   gauravj@adobe.com
Date:     2009-02-27T02:21:27.489350Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
151 paths were modified

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

--- frameworks/projects/spark/src/spark/components/PopUpAnchor.as
+++ frameworks/projects/spark/src/spark/components/PopUpAnchor.as
@@ -34,6 +34,11 @@
  *  positioning the dropDown relative to itself.
  *
  *
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class PopUp extends UIComponent
 {
@@ -75,6 +80,11 @@

 	/**
 	 *  UIComponent to add to the PopUpManager when the PopUp is opened.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function set content(value:UIComponent):void
 	{
@@ -93,6 +103,11 @@

 	/**
 	 *  If true, add the content to the PopUpManager. If false, remove it.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function set open(value:Boolean):void
 	{
@@ -250,6 +265,11 @@
 	/**
 	 *  Call this function to update the content's transform matrix. Typically
 	 *  this would be called while performing an effect upon the PopUp.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function updateContentTransform():void
 	{