Transferred from the Adobe Open Source Subversion Repository

Revision: 13296
Author:   jszeto@adobe.com
Date:     2010-01-06T01:31:52.563455Z

Log Message:
-----------
Change event split into change and valueCommit for list based components

http://bugs.adobe.com/jira/browse/SDK-24803 - When selectedItem/selectedIndex is set programatically, list should dispatch a valueCommit event, not a change event

Refactored selection properties into helper functions which parameterize dispatching changing/change events. Changed all internal setting of the selection properties to use these helper functions.

Updated binding metadata for selection properties.

QE notes: Update tests
Doc notes: Docs should mention valueCommit versus change/changing
Bugs: SDK-24803
Reviewer: Ryan
Tests run: checkintests, ButtonBar, List, ComboBox, DropDownList
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -195,6 +195,11 @@
      */
     mx_internal var allowCustomSelectedItem:Boolean = false;

+    /**
+     *  @private
+     */
+    mx_internal var dispatchChangeAfterSelection:Boolean = false;
+
     //--------------------------------------------------------------------------
     //
     //  Overridden properties
@@ -539,7 +544,7 @@
     mx_internal var _selectedIndex:int = NO_SELECTION;

     [Bindable("change")]
-
+    [Bindable("valueCommit")]
     /**
      *  The 0-based index of the selected item, or -1 if no item is selected.
      *  Setting the selectedIndex property deselects the currently selected
@@ -579,9 +584,24 @@
      */
     public function set selectedIndex(value:int):void
     {
+        setSelectedIndex(value, false);
+    }
+
+    /**
+     *  @private
+     *  Used internally to specify whether the selectedIndex changed programmatically or due to
+     *  user interaction.
+     *
+     *  @param dispatchChangeEvent if true, the component will dispatch a "change" event if the
+     *  value has changed. Otherwise, it will dispatch a "valueCommit" event.
+     */
+    mx_internal function setSelectedIndex(value:int, dispatchChangeEvent:Boolean = false):void
+    {
         if (value == selectedIndex)
             return;
-
+
+        if (dispatchChangeEvent)
+            dispatchChangeAfterSelection = dispatchChangeEvent;
         _proposedSelectedIndex = value;
         invalidateProperties();
     }
@@ -601,7 +621,7 @@
     private var _selectedItem:*;

     [Bindable("change")]
-
+    [Bindable("valueCommit")]
     /**
      *  The item that is currently selected.
      *  Setting this property deselects the currently selected
@@ -646,13 +666,29 @@
      */
     public function set selectedItem(value:*):void
     {
+        setSelectedItem(value, false);
+    }
+
+    /**
+     *  @private
+     *  Used internally to specify whether the selectedItem changed programmatically or due to
+     *  user interaction.
+     *
+     *  @param dispatchChangeEvent if true, the component will dispatch a "change" event if the
+     *  value has changed. Otherwise, it will dispatch a "valueCommit" event.
+     */
+    mx_internal function setSelectedItem(value:*, dispatchChangeEvent:Boolean = false):void
+    {
         if (selectedItem === value)
             return;

+        if (dispatchChangeEvent)
+            dispatchChangeAfterSelection = dispatchChangeEvent;
+
         _pendingSelectedItem = value;
         invalidateProperties();
     }
-
+
     //----------------------------------
     //  useVirtualLayout
     //----------------------------------
@@ -737,7 +773,7 @@
             else if (requireSelection)
                _proposedSelectedIndex = 0;
             else
-               selectedIndex = -1;
+               setSelectedIndex(-1, false);
         }

         if (requireSelectionChanged)
@@ -780,10 +816,7 @@
             selectedIndexAdjusted = false;
             if (!changedSelection)
             {
-                e = new IndexChangeEvent(IndexChangeEvent.CHANGE);
-                e.oldIndex = selectedIndex;
-                e.newIndex = selectedIndex;
-                dispatchEvent(e);
+                dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
             }
         }

@@ -1040,6 +1073,7 @@
         var maxIndex:int = dataProvider ? dataProvider.length - 1 : -1;
         var oldSelectedIndex:int = _selectedIndex;
         var oldCaretIndex:int = _caretIndex;
+        var e:IndexChangeEvent;

         if (!allowCustomSelectedItem || _proposedSelectedIndex != CUSTOM_SELECTED_ITEM)
         {
@@ -1056,15 +1090,18 @@
         }

         // Step 2: dispatch the "changing" event. If preventDefault() is called
-        // on this event, the selection change will be cancelled.
-        var e:IndexChangeEvent = new IndexChangeEvent(IndexChangeEvent.CHANGING, false, true);
-        e.oldIndex = _selectedIndex;
-        e.newIndex = _proposedSelectedIndex;
-        if (!dispatchEvent(e))
-        {
-            // The event was cancelled. Cancel the selection change and return.
-            _proposedSelectedIndex = NO_PROPOSED_SELECTION;
-            return false;
+        // on this event, the selection change will be cancelled.
+        if (dispatchChangeAfterSelection)
+        {
+            e = new IndexChangeEvent(IndexChangeEvent.CHANGING, false, true);
+            e.oldIndex = _selectedIndex;
+            e.newIndex = _proposedSelectedIndex;
+            if (!dispatchEvent(e))
+            {
+                // The event was cancelled. Cancel the selection change and return.
+                _proposedSelectedIndex = NO_PROPOSED_SELECTION;
+                return false;
+            }
         }

         // Step 3: commit the selection change and caret change
@@ -1085,16 +1122,24 @@
         if (dispatchChangedEvents)
         {
             // Dispatch the change event
-            e = new IndexChangeEvent(IndexChangeEvent.CHANGE);
-            e.oldIndex = oldSelectedIndex;
-            e.newIndex = _selectedIndex;
-            dispatchEvent(e);
+            if (dispatchChangeAfterSelection)
+            {
+                e = new IndexChangeEvent(IndexChangeEvent.CHANGE);
+                e.oldIndex = oldSelectedIndex;
+                e.newIndex = _selectedIndex;
+                dispatchEvent(e);
+                dispatchChangeAfterSelection = false;
+            }
+            else
+            {
+                dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+            }

             //Dispatch the caretChange event
             e = new IndexChangeEvent(IndexChangeEvent.CARET_CHANGE);
             e.oldIndex = oldCaretIndex;
             e.newIndex = caretIndex;
-            dispatchEvent(e);
+            dispatchEvent(e);
         }

         return true;
@@ -1200,7 +1245,7 @@
                     invalidateProperties();
                 }
                 else
-                    selectedIndex = 0;
+                    setSelectedIndex(0, false);
             }
             else
                 adjustSelection(-1);
@@ -1249,7 +1294,7 @@
                 // Data provider is being reset, clear out the selection
                 if (dataProvider.length == 0)
                 {
-                    selectedIndex = NO_SELECTION;
+                    setSelectedIndex(NO_SELECTION, false);
                     setCurrentCaretIndex(NO_CARET);
                 }
                 else


Transferred from the Adobe Open Source Subversion Repository

Revision: 2557
Author:   jimurphy@adobe.com
Date:     2008-07-22T14:15:44.500232Z

Log Message:
-----------
Merge 3.0.x revisions [2544,2546,2551] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Tile.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormHeading.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>

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

--- frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ frameworks/projects/mx/src/mx/controls/DataGrid.as
@@ -79,6 +79,7 @@
 import mx.managers.CursorManagerPriority;
 import mx.managers.IFocusManager;
 import mx.managers.IFocusManagerComponent;
+import mx.managers.ISystemManager2;
 import mx.skins.halo.ListDropIndicator;
 import mx.styles.ISimpleStyleClient;
 import mx.styles.StyleManager;
@@ -3886,9 +3887,9 @@
         // listen for keyStrokes on the itemEditorInstance (which lets the grid supervise for ESC/ENTER)
         DisplayObject(itemEditorInstance).addEventListener(KeyboardEvent.KEY_DOWN, editorKeyDownHandler);
         // we disappear on any mouse down outside the editor
-        stage.addEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true, 0, true);
+        systemManager.addEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true, 0, true);
         // we disappear if stage is resized
-        stage.addEventListener(Event.RESIZE, editorStageResizeHandler, true, 0, true);
+        systemManager.addEventListener(Event.RESIZE, editorStageResizeHandler, true, 0, true);
     }

     /**
@@ -4751,9 +4752,8 @@
      */
     private function itemEditorItemEditBeginHandler(event:DataGridEvent):void
     {
-        // weak reference for deactivation
-        if (stage)
-            stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
+		if (root)
+	        systemManager.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);

         // if not prevented and if data is not null (might be from dataservices)
         if (!event.isDefaultPrevented() && actualContentHolder.listItems[actualRowIndex][actualColIndex].data != null)


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/framework/src/mx/logging/targets/TraceTarget.as
+++ frameworks/projects/framework/src/mx/logging/targets/TraceTarget.as
@@ -0,0 +1,74 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 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 mx.logging.targets
+{
+
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+/**
+ *  Provides a logger target that uses the global trace() method to output log messages.
+ *
+ *
To view trace() method output, you must be running the
+ *  debugger version of Flash Player or AIR Debug Launcher.

+ *
+ *
The debugger version of Flash Player and AIR Debug Launcher send output from the trace() method
+ *  to the flashlog.txt file. The default location of this file is the same directory as
+ *  the mm.cfg file. You can customize the location of this file by using the TraceOutputFileName
+ *  property in the mm.cfg file. You must also set TraceOutputFileEnable to 1 in your mm.cfg file.

+ */
+public class TraceTarget extends LineFormattedTarget
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *
Constructs an instance of a logger target that will send
+     *  the log data to the global trace() method.
+     *  All output will be directed to flashlog.txt by default.

+     */
+    public function TraceTarget()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  This method outputs the specified message directly to
+     *  trace().
+     *  All output will be directed to flashlog.txt by default.
+     *
+     *  @param message String containing preprocessed log message which may
+     *  include time, date, category, etc. based on property settings,
+     *  such as includeDate, includeCategory, etc.
+     */
+    override mx_internal function internalLog(message:String):void
+    {
+        trace(message);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3095
Author:   matamel@adobe.com
Date:     2008-09-04T15:50:31.000858Z

Log Message:
-----------
Feature: Message throttling - message frequency limits subfeature.
QA: Yes
Doc: Not yet
Checkintests: Pass

Details: This is the BlazeDS client part of the message frequency limits sub-feature of Message throttling feature. This check-in adds the ability for the Consumer to specify a maxFrequency globally or per-subscription.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/CommandMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/SubscriptionInfo.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/messages/CommandMessage.as
+++ frameworks/projects/rpc/src/mx/messaging/messages/CommandMessage.as
@@ -171,6 +171,12 @@
      * login credentials.
      */
     public static const CREDENTIALS_CHARSET_HEADER:String = "DSCredentialsCharset";
+
+    /**
+     * Header to indicate the maximum number of messages a Consumer wants to
+     * receive per second.
+     */
+    public static const MAX_FREQUENCY_HEADER:String = "DSMaxFrequency";

     //--------------------------------------------------------------------------
     //


Transferred from the Adobe Open Source Subversion Repository

Revision: 19390
Author:   smgilson@adobe.com
Date:     2010-12-15T17:40:11.121765Z

Log Message:
-----------
asdoc updates

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -49,32 +49,38 @@
 //--------------------------------------

 /**
- *  Dispatched when the selected navigator has changed as a result of
- *  the selectedIndex property or the selected
- *  tab changing.
- *
+ *  Dispatched when the current view navigator changes as a result of
+ *  a change to the selectedIndex property or a change
+ *  to the selected tab in the TabBar control.
+ *
+ *  @eventType spark.events.IndexChangeEvent.CHANGE
  */
 [Event(name="change", type="spark.events.IndexChangeEvent")]

 /**
- *  A cancelable event that is dispatched before the selected navigator
- *  is changed.  Canceling this event will prevent the active navigator
+ *  Dispatched before the selected view navigator is changed.
+ *  Canceling this event prevents the active view navigator
  *  from changing.
+ *
+ *  @eventType spark.events.IndexChangeEvent.CHANGING
  */
 [Event(name="changing", type="spark.events.IndexChangeEvent")]

 /**
- *  Dispatched when the collection of navigators managed by the
+ *  Dispatched when the collection of view navigators managed by the
  *  TabbedViewNavigator changes.
+ *
+ *  @eventType mx.events.CollectionEvent.COLLECTION_CHANGE
  */
 [Event(name="collectionChange", type="mx.events.CollectionEvent")]

 /**
- *  Dispatched when the navigator's selected index has changed.  When
- *  this event is dispatched, the selectedIndex and activeNavigator
- *  properties will be referencing the newly selected navigator.
+ *  Dispatched when the view navigator's selected index changes.
+ *  When this event is dispatched, the selectedIndex
+ *  and activeNavigator properties reference the
+ *  newly selected view navigator.
  *
- *  @eventType mx.events.FlexEvent
+ *  @eventType mx.events.FlexEvent.VALUE_COMMIT
  *
  *  @langversion 3.0
  *  @playerversion Flash 10.1
@@ -84,23 +90,30 @@
 [Event(name="valueCommit", type="mx.events.FlexEvent")]

 /**
- *  The TabbedViewNavigator component is a container that manages a collection
- *  of view navigator controls that are stacked on top of each other.  Only
- *  one navigator is active and visible at a time.  This component includes
- *  a TabBar interface control that provides the ability to toggle between
- *  the collection of navigators.
+ *  The TabbedViewNavigator class is a container that manages a collection
+ *  of view navigator containers.
+ *  Only one view navigator is active and visible at a time.
+ *  This class includes a TabBar control that provides the ability to toggle between
+ *  the collection of view navigators.
+ *
+ *
The TabbedViewNavigatorApplication container automatically creates
+ *  a single TabbedViewNavigator container for the entire application.
+ *  You can reference the TabbedViewNavigator object by using the navigator
+ *  property of the TabbedViewNavigatorApplication container.

  *
  *
The active or selected navigator can be changed by clicking the corresponding
  *  tab in the TabBar or by changing the selectedIndex property of
  *  the component.

  *
- *
The contents of a child navigator is destroyed when it is deactivate,
- *  and dynamically created when activated.  This logic can be altered by accessing
- *  the creationPolicy property of the TabbedViewNavigator and the
- * destructionPolicy property of its child navigators and active View.

+ *
The contents of a child view navigator is destroyed when it is deactivate,
+ *  and dynamically created when activated.
+ *  This logic can be altered by accessing the creationPolicy property
+ *  of the TabbedViewNavigator and the destructionPolicy property
+ *  of its child navigators and active View.

  *
  *  @see spark.components.View
  *  @see spark.components.ViewNavigator
+ *  @see spark.components.TabBar
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -259,12 +272,11 @@

     [Bindable("change")]
     /**
-     *  Returns the active navigator for the TabbedViewNavigator.  Only one
-     *  navigator can be active at a time.  The active navigator can be
-     *  set by changing the selectedIndex property or by
-     *  clicking on a tab.
-     *
-     *  @return The active navigator
+     *  The active view navigator for the TabbedViewNavigator.
+     *  Only one view navigator can be active at a time.
+     *  The active view navigator can be set by changing the
+     *  selectedIndex property or by selecting
+     *  a tab in the TabBar control.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -300,15 +312,16 @@
     private var _maintainNavigationStack:Boolean = true;

     /**
-     *  This property indicates whether the navigation stack of the view
-     *  should remain intact when the navigator is deactivated by its
-     *  parent navigator.  If set to true, when reactivated the view history
-     *  will remain the same.  If false, the navigator will display the
+     *  Specifies whether the navigation stack of the view navigator
+     *  should remain intact when the view navigator is deactivated.
+     *  If true, when reactivated the view history
+     *  remains the same.
+     *  If false, the navigator displays the
      *  first view in its navigation stack.
      *
      *  @default true
      *
-     *  @see spark.components.TabbedViewNavigator
+     *  @see spark.components.ViewNavigator
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -335,14 +348,16 @@
     private var _navigators:Vector.<ViewNavigatorBase>;

     /**
-     *  The view navigators that are managed by the the TabbedViewNavigator.
-     *  Each navigator isrepresented as a tab in this components tab bar.
-     *  Only one navigator can be active at a time, and can be referenced using
+     *  The view navigators that are managed by this TabbedViewNavigator.
+     *  Each view navigator is represented as a tab in the tab bar
+     *  of this TabbedViewNavigator.
+     *  Only one view navigator can be active at a time.
+     *  You can reference the active view navigator by using
      *  the activeNavigator property.
-	 *
-	 *
Changing this property will cause all current navigators to be removed
-	 *  and the selected index will be reset to 0. This operation cannot be
-	 *  canceled and is committed immediately.

+     *
+     *
Changing this property causes the current view navigator to be removed,
+     *  and sets the selectedIndex to 0.
+     *  This operation cannot be canceled and is committed immediately.

      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -393,19 +408,19 @@
         }

         if (value && value.length > 0)
-		{
+        {
             _selectedIndex = 0;
-		}
+        }
         else
-		{
+        {
             _selectedIndex = NO_PROPOSED_SELECTION;
-		}
-
-		// The proposed selected index is reset because it is no longer valid
-		// since the array of navigators has changed.
-		_proposedSelectedIndex = NO_PROPOSED_SELECTION;
-		selectedIndexChanged = false;
-
+        }
+
+        // The proposed selected index is reset because it is no longer valid
+        // since the array of navigators has changed.
+        _proposedSelectedIndex = NO_PROPOSED_SELECTION;
+        selectedIndexChanged = false;
+
         // Notify listeners that the collection changed
         internalDispatchEvent(CollectionEventKind.RESET);
     }
@@ -419,8 +434,8 @@
     /**
      *  Hides the tab bar of the navigator.
      *
-     *  @param animate Flag indicating whether a hide effect should play.
-     *  This property is true by default.
+     *  @param animate Indicates whether a hide effect should play
+     *  as the tab bar disappears.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -442,8 +457,8 @@
     /**
      *  Shows the tab bar of the navigator
      *
-     *  @param animate Flag indicating whether a hide effect should play.
-     *  This property is true by default.
+     *  @param animate Indicates whether a show effect should play
+     *  as the tab bar appears.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -792,9 +807,9 @@
                 if (activeView)
                     activeView.setTabBarVisible(showingTabBar);

-				// When this flag is true, the animations should only be disabled for the
-				// current frame, so reset the flag so animations play on subsequent frames.
-				disableNextControlAnimation = false;
+                // When this flag is true, the animations should only be disabled for the
+                // current frame, so reset the flag so animations play on subsequent frames.
+                disableNextControlAnimation = false;
             }
         }

@@ -1015,6 +1030,7 @@
     }

     /**
+     *  @private
      *  Method is called when a tab is clicked by the user.  The default
      *  implementation checks if the clicked tab is currently selected, and if
      *  so, pops the active navigator to its root view.
@@ -1122,7 +1138,7 @@
     [Bindable("change")]
     [Bindable("valueCommit")]
     /**
-     *  The 0-based index of the selected navigator, or -1 if no item is selected.
+     *  The 0-based index of the selected view navigator, or -1 if none is selected.
      *  Setting the selectedIndex property deselects the currently selected
      *  navigator and selects the navigator at the specified index.
      *
@@ -1220,7 +1236,7 @@
     //----------------------------------

     /**
-     *  Returns the number of child navigators being managed by the
+     *  The number of child view navigators being managed by the
      *  this component.
      *
      *  @langversion 3.0
@@ -1237,10 +1253,13 @@
     }

     /**
-     *  Add the specified item to the end of the list.  Equivalent to
-     *  addItemAt(item, length);
-     *
-     *  @param item The item to add.  Must extend ViewNavigatorBase
+     *  Add the specified view navigator to the end of the list.
+     *  Equivalent to calling addItemAt(item, length);.
+     *
+     *  @param item The view navigator  to add.
+     *  It must extend the ViewNavigatorBase class.
+     *
+     *  @see spark.components.supportClasses.ViewNavigatorBase
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -1253,13 +1272,18 @@
     }

     /**
-     *  Add the item at the specified index.
-     *  Any item that was after this index is moved out by one.
-     *
-     *  @param item the item to place at the index.  Must extend ViewNavigatorBase
-     *  @param index the index at which to place the item
-     *  @throws RangeError if index is less than 0 or greater than the length
-     *
+     *  Add the view navigator at the specified index.
+     *  Any view navigator that was after this index is moved down by one.
+     *
+     *  @param item The view navigator  to add.
+     *  It must extend the ViewNavigatorBase class.
+     *
+     *  @param index The index at which to place the item.
+     *
+     *  @throws RangeError If index is less than 0 or greater than the length
+     *
+     *  @see spark.components.supportClasses.ViewNavigatorBase
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
@@ -1302,13 +1326,16 @@
     }

     /**
-     *  Get the navigator object at the specified index.
-     *
-     *  @param  index the index in the list from which to retrieve the item
-     *  @param  prefetch int indicating both the direction and amount of items
-     *          to fetch during the request should the item not be local.
-     *  @return the navigator at that index, null if there is none
-     *  @throws RangeError if the index < 0 or index >= length
+     *  Get the view navigator object at the specified index.
+     *
+     *  @param  index The index in the list from which to retrieve the item.
+     *
+     *  @param  prefetch Indicating both the direction and amount of items
+     *          to fetch during the request, should the item not be local.
+     *
+     *  @return The navigator at the specified index, or null if there is none.
+     *
+     *  @throws RangeError If the index < 0 or index >= length
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -1328,13 +1355,12 @@
     }

     /**
-     *  Return the index of the navigator if it is in the list such that
-     *  getItemAt(index) == item.
-     *  Note that in this implementation the search is linear and is therefore
-     *  O(n).
-     *
-     *  @param item the navigator to find
-     *  @return the index of the navigator, -1 if the item is not in the list.
+     *  Return the index of the view navigator if it is in the list
+     *  of view navigators.
+     *
+     *  @param item The view navigator object to locate.
+     *
+     *  @return The index of the view navigator, or -1 if the item is not in the list.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -1347,20 +1373,20 @@
     }

     /**
-     *  Notify external components that a property on a navigator has
+     *  Notify external components that a property on a view navigator has
      *  been updated.
      *
-     *  @param item The navigator that was updated.
+     *  @param item The view navigator that was updated.
      *
      *  @param property A String, QName, or int
      *  specifying the property that was updated.
      *
      *  @param oldValue The old value of that property.
-     *  (If property was null, this can be the old value of the item.)
+     *  If property was null, this can be the old value of the item.
      *
      *  @param newValue The new value of that property.
-     *  (If property was null, there's no need to specify this
-     *  as the item is assumed to be the new value.)
+     *  If property was null, there's no need to specify this
+     *  as the item is assumed to be the new value.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -1385,7 +1411,7 @@
     }

     /**
-     *  Remove all child navigators from the navigator.
+     *  Remove all child view navigators from the navigator.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -1418,12 +1444,14 @@
     }

     /**
-     *  Remove the navigator at the specified index and return it.
-     *  Any items that were after this index are now one index earlier.
+     *  Remove the view navigator at the specified index and return it.
+     *  The index of any items that were after this index are decreased by one.
      *
      *  @param index The index from which to remove the item.
+     *
      *  @return The item that was removed.
-     *  @throws RangeError if index < 0 or index >= length.
+     *
+     *  @throws RangeError If index < 0 or index >= length.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -1456,14 +1484,17 @@
     }

     /**
-     *  Place the navigator at the specified index.
-     *  If an item was already at that index the new item will replace it and it
-     *  will be returned.
-     *
-     *  @param  item the navigator to place at the index
-     *  @param  index the index at which to place the navigator
-     *  @return the navigator that was replaced, null if none
-     *  @throws RangeError if index is less than 0 or greater than or equal to length
+     *  Add the view navigator at the specified index.
+     *  If an item was already at that index, the new item replaces it,
+     *  and it is returned.
+     *
+     *  @param  item The view navigator to place at the index.
+     *
+     *  @param  index The index at which to place the navigator.
+     *
+     *  @return The navigator that was replaced, or null if none.
+     *
+     *  @throws RangeError If index is less than 0 or greater than or equal to length
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -1507,7 +1538,9 @@

     /**
      *  Return an Array that is populated in the same order as the IList
-     *  implementation.
+     *  implementation.
+     *
+     *  @return The Array.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1


Restore the client connection handler.

Restore the client connection handler.

--- swfcat.as
+++ swfcat.as
@@ -152,7 +152,7 @@

                 puts("Client: connecting to " + client_addr.host + ":" + client_addr.port + ".");
                 s_c.connect(client_addr.host, client_addr.port);
-
+                s_c.addEventListener(Event.CONNECT, client_connected);
             });

             s_f.writeUTFBytes("GET / HTTP/1.0\r\n\r\n");


423 Changed an odd-one-out ArgumentError to ParseError

--- raw/src/org/yellcorp/lib/serial/ParseUtil.as
+++ raw/src/org/yellcorp/lib/serial/ParseUtil.as
@@ -73,7 +73,7 @@

         if (isNaN(result))
         {
-            throw new ArgumentError("Value is not a number: " + value);
+            throw new ParseError("Value is not a number: " + value);
         }
         return result;
     }


M Rename DataBindings.getDataProviderAt by DataBindings.getProviderAt

--- src/aerys/minko/type/data/DataBindings.as
+++ src/aerys/minko/type/data/DataBindings.as
@@ -161,7 +161,7 @@
 				delete _bindingNameToChangedSignal[bindingName];
 		}

-		public function getDataProviderAt(index : uint) : IDataProvider
+		public function getProviderAt(index : uint) : IDataProvider
 		{
 			if (index >= _numProviders)
 				throw new ArgumentError('Index out of bounds.');


Tried once again to make a labeled continue work. It doesn't.
I thought maybe this was fixed, because in early betas the "with" statement
didn't work, but it does now.

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

--- src/as/com/threerings/util/DisplayUtil.as
+++ src/as/com/threerings/util/DisplayUtil.as
@@ -103,7 +103,10 @@
         // keep track of area that doesn't generate new possibles
         var dead :Array = new Array();

-        while (possibles.length > 0) {
+        // Note: labeled breaks and continues are supposed to be legal,
+        // but they throw wacky runtime exceptions for me. So instead
+        // I'm throwing a boolean and using that to continue the while
+        /* CHECKPOSSIBLES: */ while (possibles.length > 0) {
             try {
                 var p :Point = (possibles.shift() as Point);
                 r.x = p.x;
@@ -117,6 +120,7 @@
                 // and not over a dead area
                 for each (var deadRect :Rectangle in dead) {
                     if (deadRect.intersects(r)) {
+                        //continue CHECKPOSSIBLES;
                         throw true; // continue outer loop
                     }
                 }
@@ -140,6 +144,7 @@

                         // re-sort the list
                         possibles.sort(pointSorter);
+                        //continue CHECKPOSSIBLES;
                         throw true; // continue outer loop
                     }
                 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
+++ frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
@@ -0,0 +1,1627 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2007 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 mx.managers
+{
+
+import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.display.Graphics;
+import flash.display.InteractiveObject;
+import flash.display.Loader;
+import flash.display.MovieClip;
+import flash.display.Sprite;
+import flash.display.StageAlign;
+import flash.display.StageScaleMode;
+import flash.events.Event;
+import flash.events.MouseEvent;
+import flash.geom.Rectangle;
+import flash.geom.Point;
+import flash.system.ApplicationDomain;
+import flash.system.Capabilities;
+import flash.text.Font;
+import flash.text.TextFormat;
+import flash.ui.ContextMenu;
+import flash.utils.describeType;
+import mx.core.IChildList;
+import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModule;
+import mx.core.IUIComponent;
+import mx.core.mx_internal;
+import mx.core.Singleton;
+import mx.events.FlexEvent;
+import mx.managers.DragManager;
+import mx.managers.NativeDragManagerImpl;
+import mx.managers.SystemManagerGlobals;
+import mx.styles.ISimpleStyleClient;
+import mx.styles.IStyleClient;
+import mx.core.IWindow;
+import mx.core.Window;
+
+
+use namespace mx_internal;
+
+public class WindowedSystemManager extends MovieClip implements ISystemManager
+{
+
+	public function WindowedSystemManager(rootObj:IUIComponent)
+	{
+		super();
+		_topLevelSystemManager = this;
+		topLevelWindow = rootObj;
+		SystemManagerGlobals.topLevelSystemManagers.push(this);
+		//docFrameHandler(null);
+		addEventListener(Event.ADDED, docFrameHandler);
+	}
+
+		/**
+	 *  @private
+	 *  List of top level windows.
+	 */
+	private var forms:Array = [];
+
+	/**
+	 *  @private
+	 *  The current top level window.
+	 */
+	private var form:IFocusManagerContainer;
+
+	private var topLevel:Boolean = true;
+
+	private var initialized:Boolean = false;
+
+	/**
+	 *  @private
+	 *  Number of frames since the last mouse or key activity.
+	 */
+	mx_internal var idleCounter:int = 0;
+
+	/**
+	 *  @private
+	 *  The top level window.
+	 */
+	mx_internal var topLevelWindow:IUIComponent;
+
+	/**
+	 *  @private
+	 *  pointer to Window, for cleanup
+	 */
+	private var myWindow:Window;
+
+	/**
+	 *  @private
+	 */
+	private var originalSystemManager:SystemManager;
+
+	/**
+	 *  @private
+	 */
+	private var _topLevelSystemManager:ISystemManager;
+
+		/**
+	 *  Depth of this object in the containment hierarchy.
+	 *  This number is used by the measurement and layout code.
+	 */
+	mx_internal var nestLevel:int = 0;
+
+	/**
+	 *  @private
+	 *  The mouseCatcher is the 0th child of the SystemManager,
+	 *  behind the application, which is child 1.
+	 *  It is the same size as the stage and is filled with
+	 *  transparent pixels; i.e., they've been drawn, but with alpha 0.
+	 *
+	 *  Its purpose is to make every part of the stage
+	 *  able to detect the mouse.
+	 *  For example, a Button puts a mouseUp handler on the SystemManager
+	 *  in order to capture mouseUp events that occur outside the Button.
+	 *  But if the children of the SystemManager don't have "drawn-on"
+	 *  pixels everywhere, the player won't dispatch the mouseUp.
+	 *  We can't simply fill the SystemManager itself with
+	 *  transparent pixels, because the player's pixel detection
+	 *  logic doesn't look at pixels drawn into the root DisplayObject.
+	 *
+	 *  Here is an example of what would happen without the mouseCatcher:
+	 *  Run a fixed-size Application (e.g. width="600" height="600")
+	 *  in the standalone player. Make the player window larger
+	 *  to reveal part of the stage. Press a Button, drag off it
+	 *  into the stage area, and release the mouse button.
+	 *  Without the mouseCatcher, the Button wouldn't return to its "up" state.
+	 */
+	private var mouseCatcher:Sprite;
+
+	//-----------------------------------
+	//  ISystemManager implementations
+	//-----------------------------------
+
+	//----------------------------------
+	//  cursorChildren
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the cursorChildren property.
+	 */
+	private var _cursorChildren:WindowedSystemChildrenList;
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function get cursorChildren():IChildList
+	{
+		if (!topLevel)
+			return _topLevelSystemManager.cursorChildren;
+
+		if (!_cursorChildren)
+		{
+			_cursorChildren = new WindowedSystemChildrenList(this,
+				new QName(mx_internal, "toolTipIndex"),
+				new QName(mx_internal, "cursorIndex"));
+		}
+
+		return _cursorChildren;
+	}
+
+	//----------------------------------
+	//  cursorIndex
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the toolTipIndex property.
+	 */
+	private var _cursorIndex:int = 0;
+
+	/**
+	 *  @private
+	 *  The index of the highest child that is a cursor.
+	 */
+	mx_internal function get cursorIndex():int
+	{
+		return _cursorIndex;
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function set cursorIndex(value:int):void
+	{
+		var delta:int = value - _cursorIndex;
+		_cursorIndex = value;
+	}
+
+	//----------------------------------
+    //  document
+    //----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the document property.
+	 */
+	private var _document:Object;
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function get document():Object
+	{
+		return _document;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set document(value:Object):void
+	{
+		_document = value;
+	}
+
+	//----------------------------------
+	//  embeddedFontList
+	//----------------------------------
+
+   	/**
+   	 *  @private
+   	 *  Storage for the fontList property.
+   	 */
+   	private var _fontList:Object = null;
+
+	/**
+	 *  A table of embedded fonts in this application.  The
+	 *  object is a table indexed by the font name.
+	 */
+	public function get embeddedFontList():Object
+	{
+	    if (_fontList == null)
+	    {
+            _fontList = {};
+
+            var o:Object = info()["fonts"];
+
+			var p:String;
+
+            for (p in o)
+         	{
+                _fontList[p] = o[p];
+            }
+
+            // FIXME: font rules across SWF boundaries have not been finalized!
+
+			// Top level systemManager may not be defined if SWF is loaded
+			// as a background image in download progress bar.
+      		if (!topLevel && _topLevelSystemManager)
+   		    {
+		        var fl:Object = _topLevelSystemManager.embeddedFontList;
+			    for (p in fl)
+			    {
+			        _fontList[p] = fl[p];
+			    }
+		    }
+		}
+
+		return _fontList;
+	}
+
+	//----------------------------------
+    //  focusPane
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _focusPane:Sprite;
+
+	/**
+     *  @copy mx.core.UIComponent#focusPane
+	 */
+    public function get focusPane():Sprite
+	{
+		return _focusPane;
+	}
+
+	/**
+     *  @private
+     */
+    public function set focusPane(value:Sprite):void
+    {
+        if (value)
+        {
+            addChild(value);
+
+            value.x = 0;
+			value.y = 0;
+            value.scrollRect = null;
+
+            _focusPane = value;
+        }
+        else
+        {
+            removeChild(_focusPane);
+
+            _focusPane = null;
+        }
+    }
+		//----------------------------------
+	//  $numChildren
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  This property allows access to the Player's native implementation
+	 *  of the numChildren property, which can be useful since components
+	 *  can override numChildren and thereby hide the native implementation.
+	 *  Note that this "base property" is final and cannot be overridden,
+	 *  so you can count on it to reflect what is happening at the player level.
+	 */
+	mx_internal final function get $numChildren():int
+	{
+		return super.numChildren;
+	}
+
+    //----------------------------------
+    //  numModalWindows
+    //----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the numModalWindows property.
+	 */
+	private var _numModalWindows:int = 0;
+
+	/**
+	 *  The number of modal windows.  Modal windows don't allow
+	 *  clicking in another windows which would normally
+	 *  activate the FocusManager in that window.  The PopUpManager
+	 *  modifies this count as it creates and destroys modal windows.
+	 */
+	public function get numModalWindows():int
+	{
+		return _numModalWindows;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set numModalWindows(value:int):void
+	{
+		_numModalWindows = value;
+	}
+//----------------------------------
+	//  popUpChildren
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the popUpChildren property.
+	 */
+	private var _popUpChildren:WindowedSystemChildrenList;
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function get popUpChildren():IChildList
+	{
+		if (!topLevel)
+			return _topLevelSystemManager.popUpChildren;
+
+		if (!_popUpChildren)
+		{
+			_popUpChildren = new WindowedSystemChildrenList(this,
+				new QName(mx_internal, "noTopMostIndex"),
+				new QName(mx_internal, "topMostIndex"));
+		}
+
+		return _popUpChildren;
+	}
+
+	//----------------------------------
+	//  noTopMostIndex
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the noTopMostIndex property.
+	 */
+	private var _noTopMostIndex:int = 0;
+
+	/**
+	 *  @private
+	 *  The index of the highest child that isn't a topmost/popup window
+	 */
+	mx_internal function get noTopMostIndex():int
+	{
+		return _noTopMostIndex;
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function set noTopMostIndex(value:int):void
+	{
+		var delta:int = value - _noTopMostIndex;
+		_noTopMostIndex = value;
+		topMostIndex += delta;
+	}
+	//----------------------------------
+	//  rawChildren
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the rawChildren property.
+	 */
+	private var _rawChildren:WindowedSystemRawChildrenList;
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function get rawChildren():IChildList
+	{
+		if (!topLevel)
+			return _topLevelSystemManager.rawChildren;
+
+		if (!_rawChildren)
+			_rawChildren = new WindowedSystemRawChildrenList(this);
+
+		return _rawChildren;
+	}
+
+	//--------------------------------------------------------------------------
+	//  screen
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the screen property.
+	 */
+	private var _screen:Rectangle;
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function get screen():Rectangle
+	{
+		if (!_screen)
+			_screen = new Rectangle();
+		_screen.x = 0;
+		_screen.y = 0;
+		_screen.width = stage.stageWidth; //Capabilities.screenResolutionX;
+		_screen.height = stage.stageHeight; //Capabilities.screenResolutionY;
+
+
+		return _screen;
+	}
+
+	//----------------------------------
+	//  toolTipChildren
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the toolTipChildren property.
+	 */
+	private var _toolTipChildren:WindowedSystemChildrenList;
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function get toolTipChildren():IChildList
+	{
+		if (!topLevel)
+			return _topLevelSystemManager.toolTipChildren;
+
+		if (!_toolTipChildren)
+		{
+			_toolTipChildren = new WindowedSystemChildrenList(this,
+				new QName(mx_internal, "topMostIndex"),
+				new QName(mx_internal, "toolTipIndex"));
+		}
+
+		return _toolTipChildren;
+	}
+	//----------------------------------
+	//  toolTipIndex
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the toolTipIndex property.
+	 */
+	private var _toolTipIndex:int = 0;
+
+	/**
+	 *  @private
+	 *  The index of the highest child that is a tooltip
+	 */
+	mx_internal function get toolTipIndex():int
+	{
+		return _toolTipIndex;
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function set toolTipIndex(value:int):void
+	{
+		var delta:int = value - _toolTipIndex;
+		_toolTipIndex = value;
+		cursorIndex += delta;
+	}
+
+	//----------------------------------
+	//  topLevelSystemManager
+	//----------------------------------
+
+	/**
+	 *  Returns the SystemManager responsible for the application window.  This will be
+	 *  the same SystemManager unless this application has been loaded into another
+	 *  application.
+	 */
+	public function get topLevelSystemManager():ISystemManager
+	{
+		if (topLevel)
+			return this;
+
+		return _topLevelSystemManager;
+	}
+
+	//----------------------------------
+	//  topMostIndex
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the topMostIndex property.
+	 */
+	private var _topMostIndex:int = 0;
+
+	/**
+	 *  @private
+	 *  The index of the highest child that is a topmost/popup window
+	 */
+	mx_internal function get topMostIndex():int
+	{
+		return _topMostIndex;
+	}
+
+	mx_internal function set topMostIndex(value:int):void
+	{
+		var delta:int = value - _topMostIndex;
+		_topMostIndex = value;
+		toolTipIndex += delta;
+	}
+
+	//----------------------------------
+    //  width
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _width:Number;
+
+	/**
+	 *  The width of this object.  For the SystemManager
+	 *  this should always be the width of the stage unless the application was loaded
+	 *  into another application.  If the application was not loaded
+	 *  into another application, setting this value will have no effect.
+	 */
+	override public function get width():Number
+	{
+		return _width;
+	}
+
+	//----------------------------------
+    //  window
+    //----------------------------------
+    /**
+	 *  @private
+	 */
+	private var _window:Window = null;
+
+	mx_internal function get window():Window
+	{
+		return _window;
+	}
+
+	mx_internal function set window(value:Window):void
+	{
+		_window = value;
+	}
+
+
+	 //----------------------------------
+    //  height
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _height:Number;
+
+	/**
+	 *  The height of this object.  For the SystemManager
+	 *  this should always be the width of the stage unless the application was loaded
+	 *  into another application.  If the application was not loaded
+	 *  into another application, setting this value has no effect.
+	 */
+	override public function get height():Number
+	{
+		return _height;
+	}
+
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods: Focus
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function activate(f:IFocusManagerContainer):void
+	{
+		// trace("SM: activate " + f + " " + forms.length);
+
+		if (form)
+		{
+			if (form != f && forms.length > 1)
+			{
+				// Switch the active form.
+				var z:IFocusManagerContainer = form;
+				// trace("OLW " + f + " deactivating old form " + z);
+				z.focusManager.deactivate();
+			}
+		}
+
+		form = f;
+
+		// trace("f = " + f);
+		if (f.focusManager)
+			// trace("has focus manager");
+
+		f.focusManager.activate();
+
+		// trace("END SM: activate " + f);
+	}
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function deactivate(f:IFocusManagerContainer):void
+	{
+		// trace(">>SM: deactivate " + f);
+
+		if (form)
+		{
+			// If there's more thna one form and this is it, find a new form.
+			if (form == f && forms.length > 1)
+			{
+				form.focusManager.deactivate();
+
+				var newForm:IFocusManagerContainer;
+
+				var n:int = forms.length;
+				for (var i:int = 0; i < n; i++)
+				{
+					var g:IFocusManagerContainer = forms[i];
+					if (g == f)
+					{
+						// use the first form above us in taborder, or the first one below.
+						for (i = i + 1; i < n; i++)
+						{
+							g = forms[i];
+							// remember the highest visible window.
+							if (Sprite(g).visible == true && IUIComponent(g).enabled)
+								newForm = g;
+						}
+						form = newForm;
+						break;
+					}
+					else
+					{
+						// remember the highest visible window.
+						if (Sprite(g).visible && IUIComponent(g).enabled)
+							newForm = g;
+					}
+				}
+
+				// make sure we have a valid top level window.
+				// This can be null if top level window has been hidden for some reason.
+				if (form)
+					form.focusManager.activate();
+			}
+		}
+
+		// trace("<<SM: deactivate " + f);
+	}
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function addFocusManager(f:IFocusManagerContainer):void
+	{
+		// trace("OLW: add focus manager" + f);
+
+		forms.push(f);
+
+		// trace("END OLW: add focus manager" + f);
+	}
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function removeFocusManager(f:IFocusManagerContainer):void
+	{
+		// trace("OLW: remove focus manager" + f);
+
+		var n:int = forms.length;
+		for (var i:int = 0; i < n; i++)
+		{
+			if (forms[i] == f)
+			{
+				if (form == f)
+					deactivate(f);
+				forms.splice(i, 1);
+				// trace("END OLW: successful remove focus manager" + f);
+				return;
+			}
+		}
+
+		// trace("END OLW: remove focus manager" + f);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods: Initialization
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  This method is overridden in the autogenerated subclass.
+	 */
+	public function create(... params):Object
+	{
+		var mainClassName:String = String(params[0]);
+
+		var mainClass:Class = Class(getDefinitionByName(mainClassName));
+		if (!mainClass)
+			throw new Error("Class '" + mainClassName + "' not found.");
+
+		var instance:Object = new mainClass();
+		if (instance is IFlexModule)
+			(IFlexModule(instance)).moduleFactory = this;
+		return instance;
+	}
+
+	/**
+	 *  @private
+	 *  This is attached as the framescript at the end of frame 2.
+	 *  When this function is called, we know that the application
+	 *  class has been defined and read in by the Player.
+	 */
+	protected function docFrameHandler(event:Event = null):void
+	{
+		removeEventListener(Event.ADDED, docFrameHandler);
+
+		// Register singleton classes.
+		// Note: getDefinitionByName() will return null
+		// if the class can't be found.
+		/*
+		Singleton.registerClass("mx.managers::ICursorManager",
+			Class(getDefinitionByName("mx.managers::CursorManagerImpl")));
+
+		Singleton.registerClass("mx.managers::IDragManager",
+			Class(getDefinitionByName("mx.managers::DragManagerImpl")));
+
+		Singleton.registerClass("mx.managers::IHistoryManager",
+			Class(getDefinitionByName("mx.managers::HistoryManagerImpl")));
+
+		Singleton.registerClass("mx.managers::ILayoutManager",
+			Class(getDefinitionByName("mx.managers::LayoutManager")));
+
+		Singleton.registerClass("mx.managers::IPopUpManager",
+			Class(getDefinitionByName("mx.managers::PopUpManagerImpl")));
+
+		Singleton.registerClass("mx.styles::IStyleManager",
+			Class(getDefinitionByName("mx.styles::StyleManagerImpl")));
+
+		Singleton.registerClass("mx.styles::IStyleManager2",
+			Class(getDefinitionByName("mx.styles::StyleManagerImpl")));
+
+		Singleton.registerClass("mx.managers::IToolTipManager2",
+			Class(getDefinitionByName("mx.managers::ToolTipManagerImpl")));*/
+
+//		executeCallbacks();
+//		doneExecutingInitCallbacks = true;
+
+		// Loaded SWFs don't get a stage right away
+		// and shouldn't override the main SWF's setting anyway.
+		if (stage)
+		{
+			stage.scaleMode = StageScaleMode.NO_SCALE;
+			stage.align = StageAlign.TOP_LEFT;
+		}
+
+        var mixinList:Array = info()["mixins"];
+		if (mixinList && mixinList.length > 0)
+		{
+		    var n:int = mixinList.length;
+			for (var i:int = 0; i < n; ++i)
+		    {
+		        // trace("initializing mixin " + mixinList[i]);
+		        var c:Class = Class(getDefinitionByName(mixinList[i]));
+		        c["init"](this);
+		    }
+        }
+
+	//	installCompiledResourceBundles();
+
+		initializeTopLevelWindow(null);
+
+		if (Singleton.getClass("mx.managers::IDragManager").getInstance() is NativeDragManagerImpl)
+			NativeDragManagerImpl(Singleton.getClass("mx.managers::IDragManager").getInstance()).registerSystemManager(this);
+	}
+
+	/**
+	 *  @private
+	 *  Instantiates an instance of the top level window
+	 *  and adds it as a child of the SystemManager.
+	 */
+	protected function initializeTopLevelWindow(event:Event):void
+	{
+		initialized = true;
+
+		if (!parent)
+			return;
+
+		initContextMenu();
+		if (!topLevel)
+		{
+			var obj:DisplayObjectContainer = parent.parent;
+
+  			// if there is no grandparent at this point, we might have been removed and
+  			// are about to be killed so just bail.  Other code that runs after
+  			// this point expects us to be grandparented.  Another scenario
+  			// is that someone loaded us but not into a parented loader, but that
+  			// is not allowed.
+  			if (!obj)
+  				return;
+
+			while (obj)
+			{
+				if (obj is IUIComponent)
+				{
+					_topLevelSystemManager = IUIComponent(obj).systemManager;
+					break;
+				}
+				obj = obj.parent;
+			}
+		}
+
+		// capture mouse down so we can switch top level windows and activate
+		// the right focus manager before the components inside start
+		// processing the event
+		addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, true);
+
+	//	if (topLevel && stage)
+		 	stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true);
+
+		var app:IUIComponent;
+		// Create a new instance of the toplevel class
+        document = app = topLevelWindow;// = IUIComponent(create());
+
+		if (document)
+		{
+			// Add listener for the creationComplete event
+/*			IEventDispatcher(app).addEventListener(FlexEvent.CREATION_COMPLETE,
+												   appCreationCompleteHandler);
+*/
+			if (topLevel && stage)
+			{
+			//	LoaderConfig._url = loaderInfo.url;
+			//	LoaderConfig._parameters = loaderInfo.parameters;
+
+				// stageWidth/stageHeight may have changed between initialize() and now,
+				// so refresh our _width and _height here.
+				_width = stage.stageWidth;
+				_height = stage.stageHeight;
+				//trace("width", _width);
+
+				IFlexDisplayObject(app).setActualSize(stage.stageWidth, stage.stageHeight);
+			}
+			else
+			{
+				IFlexDisplayObject(app).setActualSize(loaderInfo.width, loaderInfo.height);
+			}
+
+			// Wait for the app to finish its initialization sequence
+			// before doing an addChild().
+			// Otherwise, the measurement/layout code will cause the
+			// player to do a bunch of unnecessary screen repaints,
+			// which slows application startup time.
+
+			// Pass in the application instance to the preloader using registerApplication
+		//	preloader.registerApplication(app);
+
+			// The Application doesn't get added to the SystemManager in the standard way.
+			// We want to recursively create the entire application subtree and process
+			// it with the LayoutManager before putting the Application on the display list.
+			// So here we what would normally happen inside an override of addChild().
+			// Leter, when we actually attach the Application instance,
+			// we call super.addChild(), which is the bare player method.
+			addingChild(DisplayObject(app));
+			childAdded(DisplayObject(app)); // calls app.createChildren()
+		}
+		else
+		{
+			document = this;
+		}
+
+	}
+
+
+	//----------------------------------
+	//  info
+	//----------------------------------
+
+    /**
+	 *  @private
+     */
+    public function info():Object
+    {
+        return {};
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods: Styles
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Call regenerateStyleCache() on all children of this SystemManager.
+	 *  If the recursive parameter is true, continue doing this
+	 *  for all descendants of these children.
+	 */
+	mx_internal function regenerateStyleCache(recursive:Boolean):void
+	{
+		var foundTopLevelWindow:Boolean = false;
+
+		var n:int = rawChildren.numChildren;
+		for (var i:int = 0; i < n; i++)
+		{
+			var child:IStyleClient =
+				rawChildren.getChildAt(i) as IStyleClient;
+
+			if (child)
+				child.regenerateStyleCache(recursive);
+
+			if (isTopLevelWindow(DisplayObject(child)))
+				foundTopLevelWindow = true;
+
+			// Refetch numChildren because notifyStyleChangedInChildren()
+			// can add/delete a child and therefore change numChildren.
+			n = rawChildren.numChildren;
+		}
+
+		// During startup the top level window isn't added
+		// to the child list until late into the startup sequence.
+		// Make sure we call regenerateStyleCache()
+		// on the top level window even if it isn't a child yet.
+		if (!foundTopLevelWindow && topLevelWindow is IStyleClient)
+			IStyleClient(topLevelWindow).regenerateStyleCache(recursive);
+	}
+
+	/**
+	 *  @private
+	 *  Call styleChanged() and notifyStyleChangeInChildren()
+	 *  on all children of this SystemManager.
+	 *  If the recursive parameter is true, continue doing this
+	 *  for all descendants of these children.
+	 */
+	mx_internal function notifyStyleChangeInChildren(styleProp:String,
+													 recursive:Boolean):void
+	{
+		var foundTopLevelWindow:Boolean = false;
+
+		var n:int = rawChildren.numChildren;
+		for (var i:int = 0; i < n; i++)
+		{
+			var child:IStyleClient =
+				rawChildren.getChildAt(i) as IStyleClient;
+
+			if (child)
+			{
+				child.styleChanged(styleProp);
+				child.notifyStyleChangeInChildren(styleProp, recursive);
+			}
+
+			if (isTopLevelWindow(DisplayObject(child)))
+				foundTopLevelWindow = true;
+
+			// Refetch numChildren because notifyStyleChangedInChildren()
+			// can add/delete a child and therefore change numChildren.
+			n = rawChildren.numChildren;
+		}
+
+		// During startup the top level window isn't added
+		// to the child list until late into the startup sequence.
+		// Make sure we call notifyStyleChangeInChildren()
+		// on the top level window even if it isn't a child yet.
+		if (!foundTopLevelWindow && topLevelWindow is IStyleClient)
+		{
+			IStyleClient(topLevelWindow).styleChanged(styleProp);
+			IStyleClient(topLevelWindow).notifyStyleChangeInChildren(
+				styleProp, recursive);
+		}
+	}
+
+
+    /**
+     *  @private
+     *  Disable all the built-in items except "Print...".
+     */
+    private function initContextMenu():void
+    {
+        var defaultMenu:ContextMenu = new ContextMenu();
+        defaultMenu.hideBuiltInItems();
+        defaultMenu.builtInItems.print = true;
+        contextMenu = defaultMenu;
+    }
+		/**
+	 *  Returns <code>true</code> if the given DisplayObject is the
+	 *  top-level window.
+	 *
+	 *  @param object
+	 *
+	 *  @return <code>true</code> if the given DisplayObject is the
+	 *  top-level window.
+	 */
+	public function isTopLevelWindow(object:DisplayObject):Boolean
+	{
+		return object is IUIComponent &&
+			   IUIComponent(object) == topLevelWindow;
+	}
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function getDefinitionByName(name:String):Object
+	{
+		var domain:ApplicationDomain = ApplicationDomain.currentDomain;
+	/*		!topLevel && parent is Loader ?
+			Loader(parent).contentLoaderInfo.applicationDomain :
+            info()["currentDomain"] as ApplicationDomain;
+*/
+		//trace("SysMgr.getDefinitionByName domain",domain,"currentDomain",info()["currentDomain"]);
+
+        var definition:Object;
+
+        if (domain.hasDefinition(name))
+		{
+			definition = domain.getDefinition(name);
+			//trace("SysMgr.getDefinitionByName got definition",definition,"name",name);
+		}
+
+		return definition;
+	}
+
+	/**
+	 *  @inheritDoc
+	 */
+	public function isTopLevel():Boolean
+	{
+		return topLevel;
+	}
+
+	/**
+	 *  @inheritDoc
+	 */
+    public function isFontFaceEmbedded(textFormat:TextFormat):Boolean
+    {
+        var fontName:String = textFormat.font;
+
+        var fl:Array = Font.enumerateFonts();
+        for (var f:int = 0; f < fl.length; ++f)
+        {
+            var font:Font = Font(fl[f]);
+            if (font.fontName == fontName)
+            {
+                var style:String = "regular";
+                if (textFormat.bold && textFormat.italic)
+                    style = "boldItalic";
+                else if (textFormat.bold)
+                    style = "bold";
+                else if (textFormat.italic)
+                    style = "italic";
+
+                if (font.fontStyle == style)
+                    return true;
+            }
+        }
+
+		if (!fontName ||
+			!embeddedFontList ||
+			!embeddedFontList[fontName])
+        {
+            return false;
+        }
+
+        var info:Object = embeddedFontList[fontName];
+
+		return !((textFormat.bold && !info.bold) ||
+				 (textFormat.italic && !info.italic) ||
+				 (!textFormat.bold && !textFormat.italic &&
+				 !info.regular));
+    }
+
+
+    /**
+	 *  @private
+	 *  Keep track of the size and position of the stage.
+	 */
+	private function Stage_resizeHandler(event:Event = null):void
+	{
+		var w:Number = stage.stageWidth;
+		var h:Number = stage.stageHeight;
+
+		var	y:Number = 0;
+		var	x:Number = 0;
+
+		if (!_screen)
+			_screen = new Rectangle();
+		_screen.x = x;
+		_screen.y = y;
+		_screen.width = w;
+		_screen.height = h;
+
+
+		_width = stage.stageWidth;
+		_height = stage.stageHeight;
+
+//trace(_width, event.type);
+		if (event)
+		{
+			resizeMouseCatcher();
+			dispatchEvent(event);
+		}
+	}
+
+	/**
+	 *  @private
+	 *  Track mouse clicks to see if we change top-level forms.
+	 */
+	private function mouseDownHandler(event:MouseEvent):void
+	{
+		// Reset the idle counter.
+		idleCounter = 0;
+
+		if (numModalWindows == 0) // no modal windows are up
+		{
+			// Activate a window if we need to.
+			if (forms.length > 1)
+			{
+				var n:int = forms.length;
+				var p:DisplayObject = DisplayObject(event.target);
+				var isApplication:Boolean = document.rawChildren.contains(p);
+				while (p)
+				{
+					for (var i:int = 0; i < n; i++)
+					{
+						if (forms[i] == p)
+						{
+							var j:int = 0;
+							var index:int;
+							var newIndex:int;
+							var childList:IChildList;
+
+							if (p != form && p is IFocusManagerContainer)
+								activate(IFocusManagerContainer(p));
+							if (popUpChildren.contains(p))
+								childList = popUpChildren;
+							else
+								childList = this;
+
+							index = childList.getChildIndex(p);
+							newIndex = index;
+
+							//we need to reset n because activating p's
+							//FocusManager could have caused
+							//forms.length to have changed.
+							n = forms.length;
+							for (j = 0; j < n; j++)
+							{
+								if (childList.contains(forms[j]))
+									if (childList.getChildIndex(forms[j]) > index)
+										newIndex = childList.getChildIndex(forms[j]);
+
+							}
+							if (newIndex > index && !isApplication)
+								childList.setChildIndex(p, newIndex);
+							return;
+						}
+					}
+					p = p.parent;
+				}
+			}
+		}
+	}
+
+	/**
+	 *  @private
+	 *  Makes the mouseCatcher the same size as the stage,
+	 *  filling it with transparent pixels.
+	 */
+	private function resizeMouseCatcher():void
+	{
+		if (mouseCatcher)
+		{
+			var g:Graphics = mouseCatcher.graphics;
+			g.clear();
+			g.beginFill(0x000000, 0);
+			g.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
+			g.endFill();
+		}
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: DisplayObjectContainer
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function addChild(child:DisplayObject):DisplayObject
+	{
+		// Adjust the partition indexes
+		// before the "added" event is dispatched.
+		noTopMostIndex++;
+
+		return rawChildren_addChildAt(child, noTopMostIndex - 1);
+	}
+
+    /**
+	 *  @private
+	 */
+	override public function addChildAt(child:DisplayObject,
+										index:int):DisplayObject
+	{
+		// Adjust the partition indexes
+		// before the "added" event is dispatched.
+		noTopMostIndex++;
+
+		return rawChildren_addChildAt(child, index);
+	}
+
+    /**
+	 *  @private
+	 */
+	override public function removeChild(child:DisplayObject):DisplayObject
+	{
+		// Adjust the partition indexes
+		// before the "removed" event is dispatched.
+		noTopMostIndex--;
+
+		return rawChildren_removeChild(child);
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function removeChildAt(index:int):DisplayObject
+	{
+		// Adjust the partition indexes
+		// before the "removed" event is dispatched.
+		noTopMostIndex--;
+
+		return rawChildren_removeChildAt(noTopMostIndex + index);
+	}
+
+	/**
+	 *  @private
+	 */
+  	override public function getChildAt(index:int):DisplayObject
+	{
+		return super.getChildAt(noTopMostIndex + index)
+	}
+
+	/**
+	 *  @private
+	 */
+  	override public function getChildByName(name:String):DisplayObject
+  	{
+		return super.getChildByName(name);
+  	}
+
+	/**
+	 *  @private
+	 */
+  	override public function getChildIndex(child:DisplayObject):int
+	{
+		return super.getChildIndex(child);
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function setChildIndex(child:DisplayObject, newIndex:int):void
+	{
+		super.setChildIndex(child, Math.min(noTopMostIndex + newIndex, numChildren-1));
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function getObjectsUnderPoint(point:Point):Array
+	{
+		var children:Array = [];
+
+		// Get all the children that aren't tooltips and cursors.
+		var n:int = topMostIndex;
+		for (var i:int = 0; i < n; i++)
+		{
+			var child:DisplayObject = super.getChildAt(i);
+			if (child is DisplayObjectContainer)
+			{
+				var temp:Array =
+					DisplayObjectContainer(child).getObjectsUnderPoint(point);
+
+				if (temp)
+					children = children.concat(temp);
+			}
+		}
+
+		return children;
+	}
+
+    //--------------------------------------------------------------------------
+	//
+	//  Methods: Child management
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+     *  @private
+     */
+	mx_internal function addingChild(child:DisplayObject):void
+	{
+		var newNestLevel:int = 1;
+		if (!topLevel)
+		{
+			// non-topLevel SystemManagers are buried by Flash.display.Loader and
+			// other non-framework layers so we have to figure out the nestlevel
+			// by searching up the parent chain.
+			var obj:DisplayObjectContainer = parent.parent;
+			while (obj)
+			{
+				if (obj is ILayoutManagerClient)
+				{
+					newNestLevel = ILayoutManagerClient(obj).nestLevel + 1;
+					break;
+				}
+				obj = obj.parent;
+			}
+		}
+		nestLevel = newNestLevel;
+
+		if (child is IUIComponent)
+			IUIComponent(child).systemManager = this;
+
+		// Local variables for certain classes we need to check against below.
+		// This is the backdoor way around linking in the class in question.
+		var uiComponentClassName:Class =
+			Class(getDefinitionByName("mx.core.UIComponent"));
+
+		// If the document property isn't already set on the child,
+		// set it to be the same as this component's document.
+		// The document setter will recursively set it on any
+		// descendants of the child that exist.
+		if (child is IUIComponent &&
+			!IUIComponent(child).document)
+		{
+			IUIComponent(child).document = document;
+		}
+
+		// Set the nestLevel of the child to be one greater
+		// than the nestLevel of this component.
+		// The nestLevel setter will recursively set it on any
+		// descendants of the child that exist.
+		if (child is ILayoutManagerClient)
+        	ILayoutManagerClient(child).nestLevel = nestLevel + 1;
+
+		if (child is InteractiveObject)
+			if (doubleClickEnabled)
+				InteractiveObject(child).doubleClickEnabled = true;
+
+		if (child is IUIComponent)
+			IUIComponent(child).parentChanged(this);
+
+		// Sets up the inheritingStyles and nonInheritingStyles objects
+		// and their proto chains so that getStyle() works.
+		// If this object already has some children,
+		// then reinitialize the children's proto chains.
+        if (child is IStyleClient)
+			IStyleClient(child).regenerateStyleCache(true);
+
+		if (child is ISimpleStyleClient)
+			ISimpleStyleClient(child).styleChanged(null);
+
+        if (child is IStyleClient)
+			IStyleClient(child).notifyStyleChangeInChildren(null, true);
+
+		// Need to check to see if the child is an UIComponent
+		// without actually linking in the UIComponent class.
+		if (uiComponentClassName && child is uiComponentClassName)
+			uiComponentClassName(child).initThemeColor();
+
+		// Inform the component that it's style properties
+		// have been fully initialized. Most components won't care,
+		// but some need to react to even this early change.
+		if (uiComponentClassName && child is uiComponentClassName)
+			uiComponentClassName(child).stylesInitialized();
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function childAdded(child:DisplayObject):void
+	{
+		child.dispatchEvent(new FlexEvent(FlexEvent.ADD));
+
+		if (child is IUIComponent)
+			IUIComponent(child).initialize(); // calls child.createChildren()
+	}
+
+	/**
+     *  @private
+     */
+	mx_internal function removingChild(child:DisplayObject):void
+	{
+		child.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
+	}
+
+	/**
+     *  @private
+     */
+	mx_internal function childRemoved(child:DisplayObject):void
+	{
+		if (child is IUIComponent)
+			IUIComponent(child).parentChanged(null);
+	}
+
+    //--------------------------------------------------------------------------
+	//
+	//  Methods: Support for rawChildren access
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	mx_internal function rawChildren_addChild(child:DisplayObject):DisplayObject
+	{
+		addingChild(child);
+
+		super.addChild(child);
+
+		childAdded(child); // calls child.createChildren()
+
+		return child;
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function rawChildren_addChildAt(child:DisplayObject,
+												index:int):DisplayObject
+	{
+		addingChild(child);
+
+		super.addChildAt(child, index);
+
+		childAdded(child); // calls child.createChildren()
+
+		return child;
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function rawChildren_removeChild(child:DisplayObject):DisplayObject
+	{
+		removingChild(child);
+
+		super.removeChild(child);
+
+		childRemoved(child);
+
+		return child;
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function rawChildren_removeChildAt(index:int):DisplayObject
+	{
+		var child:DisplayObject = super.getChildAt(index);
+
+		removingChild(child);
+
+		super.removeChildAt(index);
+
+		childRemoved(child);
+
+		return child;
+	}
+
+	/**
+	 *  @private
+	 */
+  	mx_internal function rawChildren_getChildAt(index:int):DisplayObject
+	{
+		return super.getChildAt(index);
+	}
+
+	/**
+	 *  @private
+	 */
+  	mx_internal function rawChildren_getChildByName(name:String):DisplayObject
+  	{
+		return super.getChildByName(name);
+  	}
+
+	/**
+	 *  @private
+	 */
+  	mx_internal function rawChildren_getChildIndex(child:DisplayObject):int
+	{
+		return super.getChildIndex(child);
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function rawChildren_setChildIndex(child:DisplayObject, newIndex:int):void
+	{
+		super.setChildIndex(child, newIndex);
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function rawChildren_getObjectsUnderPoint(pt:Point):Array
+	{
+		return super.getObjectsUnderPoint(pt);
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function rawChildren_contains(child:DisplayObject):Boolean
+	{
+		return super.contains(child);
+	}
+
+	// fake out mouseX/mouseY
+	mx_internal var _mouseX:*;
+	mx_internal var _mouseY:*;
+
+
+	/**
+	 *  @private
+	 */
+	override public function get mouseX():Number
+	{
+		if (_mouseX === undefined)
+			return super.mouseX;
+		return _mouseX;
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function get mouseY():Number
+	{
+		if (_mouseY === undefined)
+			return super.mouseY;
+		return _mouseY;
+	}
+
+	/**
+	 *  @private
+	 *  Cleans up references to Window. Also removes self from topLevelSystemManagers list.
+	 */
+	mx_internal function cleanup(e:Event):void
+	{
+		if (NativeDragManagerImpl(Singleton.getClass("mx.managers::IDragManager").getInstance())
+					 is NativeDragManagerImpl)
+			NativeDragManagerImpl(Singleton.getClass("mx.managers::IDragManager").getInstance()).unregisterSystemManager(this);
+		SystemManagerGlobals.topLevelSystemManagers.splice(SystemManagerGlobals.topLevelSystemManagers.indexOf(this), 1);
+		myWindow.removeEventListener("close", cleanup);
+		myWindow = null;
+	}
+
+	/**
+	 *  @private
+	 *  only registers Window for later cleanup.
+	 */
+	mx_internal function addWindow(win:Window):void
+	{
+		myWindow = win;
+		myWindow.nativeWindow.addEventListener("close", cleanup);
+	}
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListBaseFindPending.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListBaseFindPending.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 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 mx.controls.listClasses
 {


don't trigger layout otherwise tooltips will move somewhere else

--- frameworks/projects/HTML/asjs/src/org/apache/flex/html/accessories/ToolTipBead.as
+++ frameworks/projects/HTML/asjs/src/org/apache/flex/html/accessories/ToolTipBead.as
@@ -112,7 +112,7 @@
             var pt:Point = determinePosition(event, event.target);
             tt.x = pt.x;
             tt.y = pt.y;
-            host.addElement(tt);
+            host.addElement(tt, false); // don't trigger a layout
 		}

 		/**


Transferred from the Adobe Open Source Subversion Repository

Revision: 13082
Author:   jszeto@adobe.com
Date:     2009-12-18T00:02:56.908450Z

Log Message:
-----------
BaselinePosition bug fixes

SDK-23462 - When using embedded fonts with some components (DropDownList, HSlider, Border, DataGroup), the baselinePosition is a bad value

Added override of baselinePosition to Combobox. Removed override from DropDownListBase. Updated a few overrides to use getBaselinePositionForPart.

QE notes: none
Doc notes: none
Bugs: SDK-23462
Reviewer: Evtim
Tests run: checkintests, DropDownList, ComboBox
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/VolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
@@ -295,22 +295,7 @@
         // select the first item passed in.
         return;
     }
-
-    //----------------------------------
-    //  baselinePosition
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    override public function get baselinePosition():Number
-    {
-        if (openButton)
-            return openButton.baselinePosition;
-        else
-            return NaN;
-    }
-
+
     //----------------------------------
     //  dataProvider
     //----------------------------------


Fixed coding style

Fixed coding style

--- src/aerys/minko/type/loader/AssetsLibrary.as
+++ src/aerys/minko/type/loader/AssetsLibrary.as
@@ -25,22 +25,22 @@
 			initializeSignals();
 		}

-		public function get materials():Object
+		public function get materials() : Object
 		{
 			return _materials;
 		}

-		public function get textures():Object
+		public function get textures() : Object
 		{
 			return _textures;
 		}

-		public function get geometries():Object
+		public function get geometries() : Object
 		{
 			return _geometries;
 		}

-		private function initialize():void
+		private function initialize() : void
 		{
 			_geometries		= {};
 			_textures		= {};
@@ -54,7 +54,7 @@
 			_nameToLayer	= {};
 		}

-		private function initializeSignals():void
+		private function initializeSignals() : void
 		{
 			_geometryAdded	= new Signal('AssetsLibrary.geometryAdded');
 			_textureAdded	= new Signal('AssetsLibrary.textureAdded');
@@ -62,22 +62,22 @@
 			_layerAdded		= new Signal('AssetsLibrary.layerAdded');
 		}

-		public function get layerAdded():Signal
+		public function get layerAdded() : Signal
 		{
 			return _layerAdded;
 		}

-		public function get materialAdded():Signal
+		public function get materialAdded() : Signal
 		{
 			return _materialAdded;
 		}

-		public function get textureAdded():Signal
+		public function get textureAdded() : Signal
 		{
 			return _textureAdded;
 		}

-		public function get geometryAdded():Signal
+		public function get geometryAdded() : Signal
 		{
 			return _geometryAdded;
 		}


Make TextureLoader extendable.

Make TextureLoader extendable.

--- src/aerys/minko/type/loader/TextureLoader.as
+++ src/aerys/minko/type/loader/TextureLoader.as
@@ -27,7 +27,8 @@
 		private var _isComplete			: Boolean;

 		private var _mipmap				: Boolean;
-		private var _textureResource	: TextureResource;
+
+		protected var _textureResource	: TextureResource;

 		public function get progress() : Signal
 		{


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

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:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/messaging/events/MessageAckEvent.as
+++ frameworks/projects/rpc/src/mx/messaging/events/MessageAckEvent.as
@@ -19,6 +19,12 @@

 /**
  *  The MessageAckEvent class is used to propagate acknowledge messages within the messaging system.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 public class MessageAckEvent extends MessageEvent
 {
@@ -53,6 +59,12 @@
      *  </table>
      *  @eventType acknowledge
      *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public static const ACKNOWLEDGE:String = "acknowledge";

@@ -71,6 +83,12 @@
      *  @param correlation The Message correlated with this acknowledgement.
      *
      *  @return New MessageAckEvent.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public static function createEvent(ack:AcknowledgeMessage = null, correlation:IMessage = null):MessageAckEvent
     {
@@ -98,6 +116,12 @@
      *  @param ack The AcknowledgeMessage this event should dispatch.
      *
      *  @param correlation The message correlated with this acknowledgement.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function MessageAckEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false,
             ack:AcknowledgeMessage = null, correlation:IMessage = null)
@@ -115,6 +139,12 @@

     /**
      *  The original Message correlated with this acknowledgement.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public var correlation:IMessage;

@@ -130,6 +160,12 @@

     /**
      *  Utility property to get the message property from the MessageEvent as an AcknowledgeMessage.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get acknowledgeMessage():AcknowledgeMessage
     {
@@ -162,6 +198,12 @@
      *  Clones the MessageAckEvent.
      *
      *  @return Copy of this MessageAckEvent.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     override public function clone():Event
     {
@@ -172,6 +214,12 @@
      *  Returns a string representation of the MessageAckEvent.
      *
      *  @return String representation of the MessageAckEvent.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     override public function toString():String
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 10806
Author:   chaase@adobe.com
Date:     2009-10-02T14:34:25.646970Z

Log Message:
-----------
Fixes div-by-zero bug. Some animation code made the wrong assumption that duration+repeatDelay would never be zero. It's perfectly valid to have zero-dur animations. This would cause incorrect calculations in the timing code, causing us to think that we were in some repetition cycle instead of actually having ended the current zero-dur Animation.
Fix was to special-case the "if dur==0" situation.

QE notes:  None
Doc notes: None
Bugs: SDK-21422
Reviewer: Hans
Tests run: checkintests, Mustella spark/effects
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Animation.as

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

--- frameworks/projects/spark/src/spark/effects/animation/Animation.as
+++ frameworks/projects/spark/src/spark/effects/animation/Animation.as
@@ -711,7 +711,9 @@
             {
                 // numRepeats reflects the current repetition cycle that we're going to
                 // be in, once we repeat.
-                var numRepeats:int = 2 + (_playheadTime - duration) / (duration + repeatDelay);
+                var numRepeats:int = 2;
+                if ((duration + repeatDelay) > 0)
+                    numRepeats += (_playheadTime - duration) / (duration + repeatDelay);
                 if (repeatCount == 0 || numRepeats <= repeatCount)
                 {
                     if (repeatDelay == 0)


Fix booches.

Fix booches.

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@335 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/ezgame/PlayersDisplay.as
+++ src/as/com/threerings/ezgame/PlayersDisplay.as
@@ -158,12 +158,12 @@
         return null;
     }

-    protected function drawBorder (var maxWidth :int) :void
+    protected function drawBorder (maxWidth :int) :void
     {
         // draw a blue rectangle around everything
         graphics.clear();
         graphics.lineStyle(1, 0x0000FF);
-        graphics.drawRect(0, 0, maxWidth + (border * 2), y);
+        graphics.drawRect(0, 0, maxWidth + (getBorderSpacing() * 2), y);
     }

     protected function getBackground (isTurn :Boolean) :uint


Transferred from the Adobe Open Source Subversion Repository

Revision: 18719
Author:   klin@adobe.com
Date:     2010-11-18T22:06:36.395894Z

Log Message:
-----------
Cleaned up TODOs and fixed some minor bugs.

GridDimensions.as, GridRowNode.as, Grid.as
-renamed insertValuesToVector to insertElementsToVector.
-renamed clear to clearHeights. clearHeights also doesn't reset rowCount anymore.
-optimized finding the max in GridRowNode a little.

GridColumn.as
-Invalidate the grid when headerRenderer changes. Removed the TODOs here because invalidating the Grid will cause IDataGridElements to be invalidated.
-Added Bindable metadata to rendererIsEditable.

(mx) DataGrid.as, FormItem.as, FormHeading.as
-Added Alternative metadata

QE notes: No
Doc notes: No
Bugs: SDK-27958
Reviewer: Hans, Carol
Tests run: cyclone server, checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridRowNode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderGroupLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/containers/FormHeading.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
@@ -458,8 +458,9 @@
             return;

         _headerRenderer = value;
-
-        // TBD(hmuller): invalidate CHB
+
+        if (grid)
+            grid.invalidateDisplayList();

         dispatchChangeEvent("headerRendererChanged");
     }
@@ -494,7 +495,6 @@
     {
         _headerText = value;

-        // Todo: invalidate just the GridColumnHeaderGroup not the entire grid?
         if (grid)
             grid.invalidateDisplayList();

@@ -853,7 +853,7 @@

     private var _maxWidth:Number = NaN;

-    [Bindable("maxWidthChanged")]
+    [Bindable("maxWidthChanged")]

     /**
      *  The maximum width of this column in pixels. If specified, the grid's layout will make
@@ -900,6 +900,8 @@
     //----------------------------------

     private var _rendererIsEditable:Boolean = false;
+
+    [Bindable("rendererIsEditableChanged")]

     /**
      *  Determines whether any of the item renderer's controls are editable.
@@ -935,7 +937,11 @@
      */
     public function set rendererIsEditable(value:Boolean):void
     {
+        if (_rendererIsEditable == value)
+            return;
+
         _rendererIsEditable = value;
+        dispatchChangeEvent("rendererIsEditableChanged");
     }

     //----------------------------------
@@ -944,7 +950,8 @@

     private var _resizable:Boolean = true;

-    [Bindable("resizableChanged")]
+    [Bindable("resizableChanged")]
+    [Inspectable(category="General")]

     /**
      *  Enable interactive resizing of this column's width if the grid's
@@ -1066,8 +1073,6 @@
             return;

         _sortable = value;
-
-        // TODO (klin): Should we remove the sort?

         dispatchChangeEvent("sortableChanged");
     }