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

--- frameworks/projects/airframework/src/mx/skins/halo/WindowMaximizeButtonSkin.as
+++ frameworks/projects/airframework/src/mx/skins/halo/WindowMaximizeButtonSkin.as
@@ -0,0 +1,205 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.skins.halo
+{
+
+import flash.system.Capabilities;
+import mx.controls.Image;
+import mx.core.UIComponent;
+import mx.states.SetProperty;
+import mx.states.State;
+
+/**
+ *  The skin for the maximize button in the TitleBar
+ *  of a WindowedApplication or Window.
+ */
+public class WindowMaximizeButtonSkin extends UIComponent
+{
+    include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class assets
+	//
+	//--------------------------------------------------------------------------
+
+	[Embed(source="../../../../assets/mac_max_up.png")]
+    private static var macMaxUpSkin:Class;
+
+    [Embed(source="../../../../assets/win_max_up.png")]
+    private static var winMaxUpSkin:Class;
+
+	[Embed(source="../../../../assets/mac_max_over.png")]
+	private static var macMaxOverSkin:Class;
+
+	[Embed(source="../../../../assets/win_max_over.png")]
+	private static var winMaxOverSkin:Class;
+
+  	[Embed(source="../../../../assets/mac_max_down.png")]
+    private static var macMaxDownSkin:Class;
+
+    [Embed(source="../../../../assets/win_max_down.png")]
+    private static var winMaxDownSkin:Class;
+
+    [Embed(source="../../../../assets/mac_max_dis.png")]
+    private static var macMaxDisabledSkin:Class;
+
+    [Embed(source="../../../../assets/win_max_dis.png")]
+    private static var winMaxDisabledSkin:Class;
+
+    [Embed(source="../../../../assets/win_restore_up.png")]
+    private static var winRestoreUpSkin:Class;
+
+   	[Embed(source="../../../../assets/win_restore_down.png")]
+    private static var winRestoreDownSkin:Class;
+
+    [Embed(source="../../../../assets/win_restore_over.png")]
+    private static var winRestoreOverSkin:Class;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function WindowMaximizeButtonSkin()
+	{
+		super();
+
+		isMac = Capabilities.os.substring(0,3) == "Mac";
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var isMac:Boolean;
+
+	/**
+	 *  @private
+	 */
+	private var skinImage:Image;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden properties: UIComponent
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  measuredHeight
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function get measuredHeight():Number
+	{
+		if (skinImage.measuredHeight)
+			return skinImage.measuredHeight;
+		else
+			return 13;
+	}
+
+	//----------------------------------
+	//  measuredWidth
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function get measuredWidth():Number
+	{
+		if (skinImage.measuredWidth)
+			return skinImage.measuredWidth;
+		else
+			return 12;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: UIComponent
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override protected function createChildren():void
+	{
+		skinImage = new Image();
+		addChild(skinImage);
+
+		initializeStates();
+
+		skinImage.setActualSize(12, 13);
+		skinImage.move(0, 0);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private function initializeStates():void
+	{
+		var upState:State = new State();
+		upState.name = "up";
+		var upProp:SetProperty = new SetProperty();
+		upProp.name = "source";
+		upProp.target = skinImage;
+		upProp.value = isMac ? macMaxUpSkin : winMaxUpSkin;
+		upState.overrides.push(upProp);
+		states.push(upState);
+
+		var downState:State = new State();
+		downState.name = "down";
+		var downProp:SetProperty = new SetProperty();
+		downProp.name = "source";
+		downProp.target = skinImage;
+		downProp.value = isMac ? macMaxDownSkin : winMaxDownSkin;
+		downState.overrides.push(downProp);
+		states.push(downState);
+
+		var overState:State = new State();
+		overState.name = "over";
+		var overProp:SetProperty = new SetProperty();
+		overProp.name = "source";
+		overProp.target = skinImage;
+		overProp.value = isMac ? macMaxOverSkin : winMaxOverSkin;
+		overState.overrides.push(overProp);
+		states.push(overState);
+
+		var disabledState:State = new State();
+		disabledState.name = "disabled";
+		var disabledProp:SetProperty = new SetProperty();
+		disabledProp.name = "source";
+		disabledProp.target = skinImage;
+		disabledProp.value = isMac ? macMaxDisabledSkin : winMaxDisabledSkin;
+		disabledState.overrides.push(disabledProp);
+		states.push(disabledState);
+	}
+}
+
+}


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

--- frameworks/projects/framework/src/mx/managers/systemClasses/PlaceholderData.as
+++ frameworks/projects/framework/src/mx/managers/systemClasses/PlaceholderData.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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.managers.systemClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12571
Author:   klin@adobe.com
Date:     2009-12-05T00:42:43.389863Z

Log Message:
-----------
Fix for https://bugs.adobe.com/jira/browse/SDK-24118. Holding down space bar while navigating a ButtonBar would cause issues with selection. I've blocked input while the user is holding down spacebar. I've also tried to gracefully handle the case where a user holds down spacebar and begins to click on the ButtonBar with the mouse by dispatching the key up event to the original button that was pressed by the space bar.

QE notes: No
Doc notes: No
Bugs: SDK-24118
Reviewer: Jason
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
@@ -100,102 +100,13 @@
         setCurrentCaretIndex(0);
     }

-    /**
-     *  @private
-     */
-    private var inCollectionChangeHandler:Boolean = false;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  requireSelection
-    //----------------------------------
-
-    private var requireSelectionChanged:Boolean;
-
-    /**
-     *  @private
-     *  See commitProperties().
-     */
-    override public function set requireSelection(value:Boolean):void
-    {
-        if (value == requireSelection)
-            return;
-
-        super.requireSelection = value;
-        requireSelectionChanged = true;
-        invalidateProperties();
-    }
-
-    //----------------------------------
-    //  dataProvider
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    override public function set dataProvider(value:IList):void
-    {
-        if (dataProvider is ISelectableList)
-        {
-            dataProvider.removeEventListener(FlexEvent.VALUE_COMMIT, dataProvider_changeHandler);
-            dataProvider.removeEventListener(IndexChangedEvent.CHANGE, dataProvider_changeHandler);
-        }
-
-        if (value is ISelectableList)
-        {
-            value.addEventListener(FlexEvent.VALUE_COMMIT, dataProvider_changeHandler);
-            value.addEventListener(IndexChangedEvent.CHANGE, dataProvider_changeHandler);
-        }
-
-        super.dataProvider = value;
-
-        if (value is ISelectableList)
-            selectedIndex = ISelectableList(dataProvider).selectedIndex;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  if the collection is changing and the collection is a viewstack
-     *  the viewstack will also adjust the selection and notify us
-     *  via dataProvider_changeHandler so we want to
-     *  ignore calls to adjustSelection that the base class
-     *  calls so we don't increment or decrement
-     *  selectedIndex twice
-     */
-    override protected function dataProvider_collectionChangeHandler(event:Event):void
-    {
-        inCollectionChangeHandler = true;
-
-        super.dataProvider_collectionChangeHandler(event);
-
-        inCollectionChangeHandler = false;
-
-    }
-
-    /**
-     *  @private
-     */
-    override protected function adjustSelection(newIndex:int, add:Boolean=false):void
-    {
-        // see comment in dataProvider_collectionChangeHandler
-        if (inCollectionChangeHandler && dataProvider is ISelectableList)
-            return;
-
-        super.adjustSelection(newIndex, add);
-    }
-
-    /**
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
      *  @private
      *  If false, don't show the focusRing for the tab at caretIndex, see
      *  itemShowingCaret() below.
@@ -212,6 +123,115 @@

     /**
      *  @private
+     */
+    private var inCollectionChangeHandler:Boolean = false;
+
+    /**
+     *  @private
+     *  Used to distinguish item_clickHandler() calls initiated by the mouse, from calls
+     *  initiated by pressing the space bar.
+     */
+    private var inKeyUpHandler:Boolean = false;
+
+    /**
+     *  @private
+     *  Index of item that is currently pressed by the
+     *  spacebar.
+     */
+    private var pressedIndex:Number;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  requireSelection
+    //----------------------------------
+
+    private var requireSelectionChanged:Boolean;
+
+    /**
+     *  @private
+     *  See commitProperties().
+     */
+    override public function set requireSelection(value:Boolean):void
+    {
+        if (value == requireSelection)
+            return;
+
+        super.requireSelection = value;
+        requireSelectionChanged = true;
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  dataProvider
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set dataProvider(value:IList):void
+    {
+        if (dataProvider is ISelectableList)
+        {
+            dataProvider.removeEventListener(FlexEvent.VALUE_COMMIT, dataProvider_changeHandler);
+            dataProvider.removeEventListener(IndexChangedEvent.CHANGE, dataProvider_changeHandler);
+        }
+
+        if (value is ISelectableList)
+        {
+            value.addEventListener(FlexEvent.VALUE_COMMIT, dataProvider_changeHandler);
+            value.addEventListener(IndexChangedEvent.CHANGE, dataProvider_changeHandler);
+        }
+
+        super.dataProvider = value;
+
+        if (value is ISelectableList)
+            selectedIndex = ISelectableList(dataProvider).selectedIndex;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  if the collection is changing and the collection is a viewstack
+     *  the viewstack will also adjust the selection and notify us
+     *  via dataProvider_changeHandler so we want to
+     *  ignore calls to adjustSelection that the base class
+     *  calls so we don't increment or decrement
+     *  selectedIndex twice
+     */
+    override protected function dataProvider_collectionChangeHandler(event:Event):void
+    {
+        inCollectionChangeHandler = true;
+
+        super.dataProvider_collectionChangeHandler(event);
+
+        inCollectionChangeHandler = false;
+
+    }
+
+    /**
+     *  @private
+     */
+    override protected function adjustSelection(newIndex:int, add:Boolean=false):void
+    {
+        // see comment in dataProvider_collectionChangeHandler
+        if (inCollectionChangeHandler && dataProvider is ISelectableList)
+            return;
+
+        super.adjustSelection(newIndex, add);
+    }
+
+    /**
+     *  @private
      */
     override protected function commitProperties():void
     {
@@ -426,6 +446,13 @@

         if (!enabled || !dataGroup || event.isDefaultPrevented())
             return;
+
+        // Block input if space bar is being held down.
+        if (!isNaN(pressedIndex))
+        {
+            event.preventDefault();
+            return;
+        }

         super.keyDownHandler(event);

@@ -449,18 +476,14 @@
             {
                 const renderer:IItemRenderer = getItemRenderer(caretIndex) as IItemRenderer;
                 if (renderer && ((!renderer.selected && requireSelection) || !requireSelection))
+                {
                     renderer.dispatchEvent(event);
+                    pressedIndex = caretIndex;
+                }
                 break;
             }
         }
     }
-
-    /**
-     *  @private
-     *  Used to distinguish item_clickHandler() calls initiated by the mouse, from calls
-     *  initiated by pressing the space bar.
-     */
-    private var inKeyUpHandler:Boolean = false;

     /**
      *  @private
@@ -480,9 +503,21 @@
             case Keyboard.SPACE:
             {
                 inKeyUpHandler = true;
-                const renderer:IItemRenderer = getItemRenderer(caretIndex) as IItemRenderer;
-                if (renderer && ((!renderer.selected && requireSelection) || !requireSelection))
-                    renderer.dispatchEvent(event);
+
+                // Need to check pressedIndex for NaN for the case when key up
+                // happens on an already selected renderer and under the condition
+                // that requireSelection=true.
+                if (!isNaN(pressedIndex))
+                {
+                    // Dispatch key up to the previously pressed item in case focus was lost
+                    // through other interaction (e.g. mouse clicks, etc...)
+                    const renderer:IItemRenderer = getItemRenderer(pressedIndex) as IItemRenderer;
+                    if (renderer && ((!renderer.selected && requireSelection) || !requireSelection))
+                    {
+                        renderer.dispatchEvent(event);
+                        pressedIndex = NaN;
+                    }
+                }
                 inKeyUpHandler = false;
                 break;
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4958
Author:   rfrishbe@adobe.com
Date:     2009-02-13T23:07:46.243121Z

Log Message:
-----------
Change the initialization sequence of FxComponent and Group.  Basically now children (including the skin) should get created at createChildren() time and follow the correct lifecycle pattern.  Unfortunately, this change got mingled in with all my PARB changes, so I'm submitting a bunch of PARB changes for Group, DataGroup, FxContainer, and FxDataContainer, outlined below:

1.     New event classes/names for Group/FxContainer and DataGroup ("elementAdd" and "elementRemove" event of type ElementExistenceEvent for Group/FxContainer and "rendererAdd" and "rendererRemove" event of type RendererExistenceEvent for DataGroup). It was just one event class of ItemExistenceChangedEvent before.
2.     LayoutBase.clipContent->clipAndEnableScrolling (same with IViewport.clipContent and GroupBase.clipContent)
3.     GroupBase.getLayoutELementAt()->getElementAt()
4.     GroupBase.numLayoutElements -> numElements.
5.     LayoutBase.virtualLayout -> useVirtualLayout
6.     ScrollUnit constants are now changed to be uints instead of typed as ScrollUnit.  This means the signature for getHorizontalScrollPositionDelta(unit:ScrollUnit):Number has changed to getHorizontalScrollPositionDelta(scrollUnit:uint):Number (and ditto for getVerticalScrollPositionDelta())
7.  DataGroup.getRendererForItemAt() -> getElementAt()
8.  DataGroup.getItemIndexForRenderer() -> getElementIndex()

Other changes:
 - Change IVisualElement interface so that it's smaller now.  It also extends ILayoutElement now.  The properties removed from IVisualElement are: rotation, rotationX, rotationY, rotationZ, transformX, transformY, offsets, x, y, z, scaleX, scaleY, scaleZ, explicitWidth, explicitMinWidth, explicitMaxWidth, explicitHeight, explicitMinHeight, explicitMaxHeight)
-  Fix in DataGroup so we don’t remove/add elements if we’re gonna do it later anyways.  I also need to do some other work in here around cleaning up of renderers.
- AddItems fix around handling IVisualElementContainers more effeciently
- get mxmlContent now returns a copy of the Array rather than the one we're using internally
- Had to update mustella since there was special case logic for dealing with getLayoutElementAt().  I added this logic for getElementAt(), which replaces that method.

QE Notes: Thanks for changing all the tests and working on the cyclone
Doc Notes: Made some ASDoc changes to some core classes to move the comments into the interfaces.  I did update the comments a bit as well.
Bugs: SDK-18115, SDK-19004
Reviewer: Jason, Glenn, Hans for initialization sequence change and Hans for all PARB changes
tests: checkintests, all mustella tests

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as" copyfrom-rev="4812" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ElementExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/RendererExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/ScrollUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/mustella.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as
@@ -236,7 +236,7 @@
         {
             _viewport.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, viewport_propertyChangeHandler);
             _viewport.removeEventListener(ResizeEvent.RESIZE, viewportResizeHandler);
-            _viewport.clipContent = false;
+            _viewport.clipAndEnableScrolling = false;
         }

         _viewport = value;
@@ -245,7 +245,7 @@
         {
             _viewport.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, viewport_propertyChangeHandler);
             _viewport.addEventListener(ResizeEvent.RESIZE, viewportResizeHandler);
-            _viewport.clipContent = true;
+            _viewport.clipAndEnableScrolling = true;
         }
     }


Add better error message when using addChild().

--- src/aerys/minko/scene/node/group/Group.as
+++ src/aerys/minko/scene/node/group/Group.as
@@ -105,7 +105,7 @@
 		public function addChild(scene : IScene) : IGroup
 		{
 			if (!scene)
-				throw new Error();
+				throw new Error("Parameter child must be non-null.");

 			_children.push(scene);
 			++_numChildren;
@@ -118,7 +118,7 @@
 		public function addChildAt(scene : IScene, position : uint) : IGroup
 		{
 			if (!scene)
-				throw new Error();
+				throw new Error("Parameter child must be non-null.");

 			var numChildren : int = _children.length;


added Compiler.parseConstant() for parsing constants and object literals.

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -275,6 +275,25 @@
 		public function compileToObject(expression:String):ICompiledObject
 		{
 			return finalize(compileTokens(getTokens(expression), true));
+		}
+
+		/**
+		 * Attempts to compile an expression as a constant, then returns the constant value.
+		 * @param constantExpression
+		 * @return The value of the expression.
+		 * @throws Error if the expression cannot be evaluated as a constant.
+		 */
+		public function parseConstant(constantExpression:String):*
+		{
+			var compiled:ICompiledObject = finalize(compileTokens(getTokens(constantExpression), false), true);
+			if (compiled is CompiledConstant)
+			{
+				return (compiled as CompiledConstant).value;
+			}
+			else
+			{
+				throw new Error("Expression does not evaluate to a constant");
+			}
 		}

 		/**
@@ -2178,13 +2197,14 @@
 		/**
 		 * Call this to move all var declarations at the beginning of the code and perform optimizations on the compiled objects.
 		 * @param compiledObject An ICompiledObject to finalize.
+		 * @param forceInlineObjectConstants If true, forces the evaluation of inline objects to constants.
 		 * @return A finialized/optimized version of compiledObject.
 		 */
-		private function finalize(compiledObject:ICompiledObject):ICompiledObject
+		private function finalize(compiledObject:ICompiledObject, forceInlineObjectConstants:Boolean = false):ICompiledObject
 		{
 			var varLookup:Object = {};

-			var final:ICompiledObject = _finalize(compiledObject, varLookup);
+			var final:ICompiledObject = _finalize(compiledObject, forceInlineObjectConstants, varLookup);
 			if (!final)
 				return compiledObject;

@@ -2212,7 +2232,7 @@
 		/**
 		 * @private helper function
 		 */
-		private function _finalize(compiledObject:ICompiledObject, varLookup:Object):ICompiledObject
+		private function _finalize(compiledObject:ICompiledObject, forceInlineObjectConstants:Boolean, varLookup:Object):ICompiledObject
 		{
 			if (compiledObject is CompiledConstant)
 				return compiledObject;
@@ -2224,7 +2244,7 @@
 			if (isFunctionHeader(call))
 				compileFunctionDefinition(call, null); // this will throw an appropriate error

-			call.compiledMethod = _finalize(call.compiledMethod, varLookup);
+			call.compiledMethod = _finalize(call.compiledMethod, forceInlineObjectConstants, varLookup);
 			if (!call.compiledMethod)
 				throw new Error("Misplaced variable declaration");
 			var params:Array = call.compiledParams;
@@ -2232,7 +2252,7 @@
 			{
 				for (i = 0; i < params.length; i++)
 				{
-					params[i] = _finalize(params[i], varLookup);
+					params[i] = _finalize(params[i], forceInlineObjectConstants, varLookup);
 					if (params[i] == null) // variable declaration eliminated?
 						params.splice(i--, 1);
 				}
@@ -2264,7 +2284,7 @@
 				{
 					if (debug)
 						trace('optimized unnecessary wrapper function call:',decompileObject(compiledObject));
-					return _finalize(params[0], varLookup);
+					return _finalize(params[0], forceInlineObjectConstants, varLookup);
 				}

 				// flatten nested grouping operators
@@ -2309,7 +2329,7 @@
 				return params[INDEX_CONDITION];
 			}

-			if (PURE_OP_LOOKUP[method as Function])
+			if (PURE_OP_LOOKUP[method as Function] || (forceInlineObjectConstants && (method == operators['{'] || method == operators['['])))
 			{
 				// if all parameters are constants, just evaluate the pure operator as a constant.
 				for each (var param:Object in params)


Added code in comments

Added code in comments

Change-Id: Ia211c41cdc37f4e1b209213cc12cc912ee040400

--- WeaveCore/src/weave/core/LibraryUtils.as
+++ WeaveCore/src/weave/core/LibraryUtils.as
@@ -19,6 +19,10 @@

 package weave.core
 {
+	import flash.system.ApplicationDomain;
+
+	import mx.rpc.events.ResultEvent;
+
 	import weave.api.WeaveAPI;

 	/**
@@ -28,6 +32,19 @@
 	 */
 	public class LibraryUtils
 	{
+//		/**
+//		 * This function gets a Class definition for a qualified class name.
+//		 * @param classQName The qualified name of a class.
+//		 * @return The class definition, or null if the class cannot be resolved.
+//		 */
+//		public static function getClassDefinition(classQName:String):Class
+//		{
+//			var domain:ApplicationDomain = ApplicationDomain.currentDomain;
+//			if (domain.hasDefinition(classQName))
+//				return domain.getDefinition(classQName) as Class;
+//			return null;
+//		}
+
 		/**
 		 * This function loads a SWC library into the current ApplicationDomain so getClassDefinition() and getDefinitionByName() can get its class definitions.
 		 * The result passed to the asyncResultHandler function will be an Array containing the qualified class names of all the classes defined in the library.
@@ -42,9 +59,37 @@
 			if (!library || WeaveAPI.SessionManager.objectWasDisposed(library))
 				_libraries[url] = library = new Library(url);

+//			library.addAsyncResponder(handleSWCLoaded, null, url);
 			library.addAsyncResponder(asyncResultHandler, asyncFaultHandler, token);
 		}

+//		/**
+//		 * @private
+//		 */
+//		private static function handleSWCLoaded(event:ResultEvent, token:Object = null):void
+//		{
+//			var url:String = token as String;
+//			var defs:Array = event.result as Array;
+//			var isLoaded:Boolean = isSWCLoaded(url);
+//			for each (var def:String in defs)
+//
+//				_classQNames[def] = isLoaded
+//
+//			//todo: check all class defs before loading swf, remove the ones that already exist
+//			// once swf is loaded, only bother initializing the ones that didn't already exist.
+//			// keep a mapping between those classes and the swc url
+//		}
+//
+//		/**
+//		 * This object maps a qualified class name to a value of true if the class should be made available through getClassDefinition().
+//		 */
+//		private static const _classQNames:Object = {};
+//
+//		public static function isSWCLoaded(url:String):Boolean
+//		{
+//			return false;
+//		}
+//
 //		/**
 //		 * This function will unload a previously loaded SWC library.
 //		 * @param url The URL of the SWC library to unload.
@@ -79,7 +124,6 @@
 import flash.system.ApplicationDomain;
 import flash.system.LoaderContext;
 import flash.utils.ByteArray;
-import flash.utils.getQualifiedClassName;

 import mx.controls.SWFLoader;
 import mx.core.mx_internal;
@@ -93,8 +137,8 @@

 import weave.api.WeaveAPI;
 import weave.api.core.IDisposableObject;
-import weave.api.core.ILinkableObject;
 import weave.core.ClassUtils;
+import weave.core.LibraryUtils;
 import weave.core.StageUtils;

 /**
@@ -183,13 +227,13 @@
 			_catalog_xml = XML(zipFile.getInput(zipFile.getEntry("catalog.xml")));
 			zipFile = null;

-			// loading a SWF in the same ApplicationDomain allows getDefinitionByName() to get classes from that SWF.
 			_swfLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleSWFFault);
 			_swfLoader.addEventListener(IOErrorEvent.IO_ERROR, handleSWFFault);
 			_swfLoader.addEventListener(ProgressEvent.PROGRESS, handleSWFProgress);
 			_swfLoader.addEventListener(Event.COMPLETE, handleSWFResult);
+
+			// Dynamic creation of Flex classes doesn't work unless the library is loaded into the same application domain.
 			_swfLoader.loaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
-			//_swfLoader.loaderContext = new LoaderContext(false, new ApplicationDomain(ApplicationDomain.currentDomain));
 			_swfLoader.load(_library_swf);

 			WeaveAPI.ProgressIndicator.addTask(_swfLoader);


added setHtmlImgSource()

added setHtmlImgSource()

--- WeaveCore/src/weave/utils/BitmapUtils.as
+++ WeaveCore/src/weave/utils/BitmapUtils.as
@@ -22,6 +22,7 @@
 	import flash.display.BitmapData;
 	import flash.display.Graphics;
 	import flash.display.IBitmapDrawable;
+	import flash.external.ExternalInterface;
 	import flash.geom.Matrix;
 	import flash.utils.ByteArray;

@@ -212,5 +213,14 @@
 			var bitmap:BitmapData = getBitmapDataFromComponent(component);
 			return new PNGEncoder().encode(bitmap);
 		}
+
+		public static function setHtmlImgSource(imgId:String, bitmapData:BitmapData):void
+		{
+			ExternalInterface.call(
+				"function(id, ascii){ document.getElementById(id).src = 'data:image/png;base64,'+ascii; }",
+				imgId,
+				StandardLib.btoa(new PNGEncoder().encode(bitmapData))
+			);
+		}
 	}
 }


remove item

remove item

--- testSrc/com/kemsky/TestStream.as
+++ testSrc/com/kemsky/TestStream.as
@@ -283,9 +283,9 @@
         {
             var s:Stream = $(1, 2, 3);
             s.removeItem(0);
-            assertEquals(s.length, 2);
+            s.removeItem(1);
+            assertEquals(s.length, 1);
             assertEquals(s[0], 2);
-            assertEquals(s[1], 3);
         }

         [Test]


Minor formatting.

Minor formatting.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@814 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flex/CommandMenu.as
+++ src/as/com/threerings/flex/CommandMenu.as
@@ -157,8 +157,7 @@

         itemsSizeChanged = true;

-        if (_verticalScrollPolicy != newPolicy)
-        {
+        if (_verticalScrollPolicy != newPolicy) {
             _verticalScrollPolicy = newPolicy;
             dispatchEvent(new Event("verticalScrollPolicyChanged"));
         }


OFC-577 Taxon language code should only allow valid ISO-3 language codes

Only values selected from autocomplete allowed

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/LanguageCodeAutoCompletePresenter.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/LanguageCodeAutoCompletePresenter.as
@@ -1,7 +1,6 @@
 package org.openforis.collect.presenter
 {
 	import flash.display.DisplayObject;
-	import flash.events.Event;
 	import flash.events.FocusEvent;
 	import flash.events.KeyboardEvent;
 	import flash.ui.Keyboard;
@@ -13,18 +12,20 @@
 	import mx.events.FlexMouseEvent;
 	import mx.managers.PopUpManager;

+	import org.granite.reflect.Field;
 	import org.openforis.collect.Application;
 	import org.openforis.collect.event.InputFieldEvent;
 	import org.openforis.collect.event.UIEvent;
 	import org.openforis.collect.i18n.LanguageCodes;
 	import org.openforis.collect.model.LanguageItem;
+	import org.openforis.collect.model.proxy.FieldProxy;
+	import org.openforis.collect.ui.component.input.InputField;
 	import org.openforis.collect.ui.component.input.LanguageCodeAutoComplete;
 	import org.openforis.collect.ui.component.input.LanguageCodeAutoCompletePopUp;
+	import org.openforis.collect.util.CollectionUtil;
 	import org.openforis.collect.util.PopUpUtil;
 	import org.openforis.collect.util.StringUtil;
-
-	import spark.events.GridEvent;
-	import spark.events.GridSelectionEvent;
+	import org.openforis.collect.util.UIUtil;

 	/**
 	 *
@@ -63,11 +64,56 @@
 		}

 		protected function inputFieldKeyDownHandler(event:KeyboardEvent):void {
-
+			switch ( event.keyCode ) {
+				case Keyboard.DOWN:
+					if ( autoCompletePopUpOpened ) {
+						autoCompletePopUp.dataGrid.setFocus();
+						if ( CollectionUtil.isNotEmpty(autoCompletePopUp.dataGrid.dataProvider) ) {
+							autoCompletePopUp.dataGrid.selectedIndex = 0;
+						}
+					}
+					break;
+				case Keyboard.ESCAPE:
+					closeAutoCompletePopUp();
+					break;
+				case Keyboard.TAB:
+					if ( autoCompletePopUpOpened ) {
+						var matchingResult:LanguageItem = getMatchingResult() as LanguageItem;
+						if ( matchingResult != null ) {
+							performSelectLanguage(matchingResult);
+						} else {
+							var text:String = autoCompleteLastInputField.text;
+							if ( StringUtil.isBlank(text) || FieldProxy.isShortCutForReasonBlank(text) ) {
+								autoCompleteLastInputField.presenter.updateValue();
+							} else {
+								autoCompleteLastInputField.presenter.undoLastChange();
+							}
+						}
+						closeAutoCompletePopUp();
+					}
+					break;
+			}
+		}
+
+		protected static function getMatchingResult():Object {
+			var searchText:String = autoCompleteLastInputField.text;
+			var list:IList = autoCompletePopUp.dataGrid.dataProvider;
+			for each (var item:Object in list) {
+				var compareToValue:String = item.code;
+				if ( compareToValue != null && searchText.toUpperCase() == compareToValue.toUpperCase() ) {
+					return item;
+				}
+			}
+			return null;
 		}

 		protected function inputFieldFocusOutHandler(event:FocusEvent):void {
-
+			var inputField:InputField = event.target.document;
+			if ( inputField != null && inputField.changed ) {
+				if ( ! autoCompletePopUpOpened && ! UIUtil.isFocusOnComponent(autoCompletePopUp) ) {
+					inputField.presenter.undoLastChange();
+				}
+			}
 		}

 		protected function inputFieldChangingHandler(event:InputFieldEvent):void {
@@ -77,7 +123,7 @@

 		protected static function languagesFilterFunction(item:LanguageItem):Boolean {
 			if ( StringUtil.isNotBlank(searchText) ) {
-				return StringUtil.startsWith(item.code, searchText, true);
+				return StringUtil.startsWith(item.code, searchText, true) || StringUtil.startsWith(item.label, searchText, true);
 			} else {
 				return false;
 			}
@@ -115,6 +161,10 @@

 		protected static function languageSelectHandler(event:UIEvent = null):void {
 			var selectedLanguage:LanguageItem = autoCompletePopUp.dataGrid.selectedItem as LanguageItem;
+			performSelectLanguage(selectedLanguage);
+		}
+
+		protected static function performSelectLanguage(selectedLanguage:LanguageItem):void {
 			if ( selectedLanguage != null ) {
 				autoCompleteLastInputField.text = selectedLanguage.code;
 				autoCompleteLastInputField.presenter.updateValue();


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

--- frameworks/projects/framework/src/mx/managers/IToolTipManager2.as
+++ frameworks/projects/framework/src/mx/managers/IToolTipManager2.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
 {


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

--- frameworks/projects/mx/src/mx/accessibility/RadioButtonAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/RadioButtonAccImpl.as
@@ -0,0 +1,109 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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.accessibility
+{
+
+import mx.controls.RadioButton;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+/**
+ *  The RadioButtonAccimpl class is the accessibility class for RadioButton.
+ *  This class inherits from the CheckBoxAccImpl.
+ *
+ *  @helpid 3008
+ *  @tiptext This is the RadioButtonAccImpl Accessibility Class.
+ *  @review
+ */
+public class RadioButtonAccImpl extends CheckBoxAccImpl
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class initialization
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Static variable triggering the hookAccessibility() method.
+	 *  This is used for initializing RadioButtonAccImpl class to hook its
+	 *  createAccessibilityImplementation() method to RadioButton class
+	 *  before it gets called from UIComponent.
+	 */
+	private static var accessibilityHooked:Boolean = hookAccessibility();
+
+	/**
+	 *  @private
+	 *  Static method for swapping the createAccessibilityImplementation()
+	 *  method of RadioButton with the RadioButtonAccImpl class.
+	 */
+	private static function hookAccessibility():Boolean
+	{
+		RadioButton.createAccessibilityImplementation =
+			createAccessibilityImplementation;
+
+		return true;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Method for creating the Accessibility class.
+	 *  This method is called from UIComponent.
+	 *  @review
+	 */
+	mx_internal static function createAccessibilityImplementation(
+								component:UIComponent):void
+	{
+		component.accessibilityImplementation =
+			new RadioButtonAccImpl(component);
+	}
+
+	/**
+	 *  Method call for enabling accessibility for a component.
+	 *  This method is required for the compiler to activate
+	 *  the accessibility classes for a component.
+	 */
+	public static function enableAccessibility():void
+	{
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param master The UIComponent instance that this AccImpl instance
+	 *  is making accessible.
+	 */
+	public function RadioButtonAccImpl(master:UIComponent)
+	{
+		super(master);
+
+		role = 0x2D;
+	}
+}
+
+}


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

--- frameworks/projects/rpc/src/mx/messaging/messages/ErrorMessage.as
+++ frameworks/projects/rpc/src/mx/messaging/messages/ErrorMessage.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Test ByteArrays a different way.

Test ByteArrays a different way.

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

--- src/as/com/threerings/ezgame/client/GameControlBackend.as
+++ src/as/com/threerings/ezgame/client/GameControlBackend.as
@@ -640,11 +640,11 @@
                 // kosher!
                 return;
             }
+            if (value is ByteArray) {
+                return; // kosher
+            }
             var clazz :Class = ClassUtil.getClass(value);
-            if (clazz == ByteArray) {
-                return; // kosher
-            }
-            var clazzparentname :String = getQualifiedSuperclassName (clazz);
+            var clazzparentname :String = getQualifiedSuperclassName(clazz);
             var rootclass :Boolean = (clazzparentname == null);
             if (! rootclass) {
                 throw new ArgumentError(


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

--- frameworks/projects/advancedgrids/src/mx/styles/metadata/GapStyles.as
+++ frameworks/projects/advancedgrids/src/mx/styles/metadata/GapStyles.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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: 2506
Author:   jimurphy@adobe.com
Date:     2008-07-16T13:25:03.893431Z

Log Message:
-----------
Merged 3.0.x revisions [2417,2458,2504] -> trunk
-I also manually updated modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java to implement flex2.linker.LinkerConfiguration due to a name change in trunk
-removed player 9 stuff

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.project" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.project</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/DependencyChecker.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/IResourceManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.actionScriptProperties" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.actionScriptProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/air-config.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="A">/flex/sdk/trunk/in/player/mac/Install Flash Player 10 UB.dmg</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.settings/org.eclipse.core.resources.prefs" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.settings/org.eclipse.core.resources.prefs</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.flexLibProperties" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.flexLibProperties</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/lnx/install_flash_player_9_linux.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/LibrariesNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/DependencyNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/win/Install Flash Player 9 Plugin.exe</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/mac/Install Flash Player 9 UB.dmg</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/MarshalMouseEvent.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/resources/LocaleSorter.as" copyfrom-rev="2504" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/LocaleSorter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/win/Install Flash Player 9 ActiveX.exe</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework" copyfrom-rev="2504" action="A">/flex/sdk/trunk/development/eclipse/flex/airframework</path>
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollThumb.as</path>
<path kind="file" action="A">/flex/sdk/trunk/in/player/win/Install Flash Player 10 Plugin.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/DefNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/in/player/win/Install Flash Player 10 ActiveX.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/LibraryNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/ScriptNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/asc/src/java/macromedia/asc/util/ContextStatics.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/DepNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.settings" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.settings</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/10/lnx/Flash Player.app.zip</path>
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/libs/player/9</path>

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

--- frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
+++ frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
@@ -17,6 +17,7 @@
 import flash.events.IEventDispatcher;
 import flash.events.TimerEvent;
 import flash.system.ApplicationDomain;
+import flash.system.Capabilities;
 import flash.system.SecurityDomain;
 import flash.utils.Timer;
 import mx.core.IFlexModuleFactory;
@@ -320,6 +321,15 @@
     }

     /**
+	 *  @copy mx.resources.IResourceManager#initializeLocaleChain()
+	 */
+	public function initializeLocaleChain(compiledLocales:Array):void
+    {
+        localeChain = LocaleSorter.sortLocalesByPreference(
+            compiledLocales, getSystemPreferredLocales(), null, true);
+    }
+
+    /**
      *  @copy mx.resources.IResourceManager#loadResourceModule()
      */
     public function loadResourceModule(url:String, updateFlag:Boolean = true,
@@ -480,6 +490,15 @@
         }
         return locales;
     }
+
+	/**
+     *  @copy mx.resources.IResourceManager#getPreferredLocaleChain()
+     */
+    public function getPreferredLocaleChain():Array /* of String */
+    {
+        return LocaleSorter.sortLocalesByPreference(
+            getLocales(), getSystemPreferredLocales(), null, true);
+    }

     /**
      *  @copy mx.resources.IResourceManager#getBundleNamesForLocale()
@@ -722,6 +741,23 @@
     }

     /**
+     *  @private
+     */
+    private function getSystemPreferredLocales():Array /* of String */
+    {
+    	var systemPreferences:Array;
+
+        // Capabilities.languages was added in AIR 1.1,
+        // so this API may not exist.
+        if (Capabilities["languages"])
+        	systemPreferences = Capabilities["languages"];
+        else
+        	systemPreferences = [ Capabilities.language ];
+
+        return systemPreferences;
+    }
+
+    /**
      *  @private.
      */
     private function dumpResourceModule(resourceModule:*):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/automation/src/mx/automation/codec/RendererPropertyCodec.as
+++ frameworks/projects/automation/src/mx/automation/codec/RendererPropertyCodec.as
@@ -0,0 +1,151 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 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.automation.codec
+{
+
+	import mx.automation.AutomationClass;
+	import mx.automation.AutomationIDPart;
+	import mx.automation.IAutomationClass;
+	import mx.automation.IAutomationManager;
+	import mx.automation.IAutomationObject;
+	import mx.automation.qtp.IQTPPropertyDescriptor;
+
+	[ResourceBundle("automation_agent")]
+
+	/**
+	 *  Translates between internal Flex component and automation-friendly version
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class RendererPropertyCodec extends AutomationObjectPropertyCodec
+	{
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		public function RendererPropertyCodec()
+		{
+			super();
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 * @private
+		 */
+		override public function encode(automationManager:IAutomationManager,
+										obj:Object,
+										pd:IQTPPropertyDescriptor,
+										relativeParent:IAutomationObject):Object
+		{
+			var val:Object = getMemberFromObject(automationManager, obj, pd);
+
+			var delegate:IAutomationObject = val as IAutomationObject;
+			if (delegate)
+			{
+				var part:AutomationIDPart = automationManager.createIDPart(delegate);
+				val = part.automationName;
+				var automationClass:IAutomationClass;
+				if (relativeParent)
+					automationClass = automationManager.automationEnvironment.getAutomationClassByInstance(relativeParent);
+				if (automationClass)
+				{
+					var propertyNameMap:Object = automationClass.propertyNameMap;
+					if (propertyNameMap["enableIndexBasedSelection"])
+						val = part.automationIndex;
+				}
+			}
+
+			if (!val && !(val is int))
+				val = "";
+
+			return val;
+		}
+
+		/**
+		 * @private
+		 */
+		override public function decode(automationManager:IAutomationManager,
+										obj:Object,
+										value:Object,
+										pd:IQTPPropertyDescriptor,
+										relativeParent:IAutomationObject):void
+		{
+			if ((!value) || value.length == 0)
+			{
+				obj[pd.name] = null;
+			}
+			else
+			{
+				var aoc:IAutomationObject =
+					(relativeParent != null ? relativeParent : obj as IAutomationObject);
+
+				var part:AutomationIDPart = new AutomationIDPart();
+				// If we have any descriptive programming element
+				// in the value string use that property.
+				// If it is a normal string assume it to be automationName
+				var text:String = String(value);
+				var separatorPos:int = text.indexOf(":=");
+				var items:Array = [];
+				if(separatorPos != -1)
+					items = text.split(":=");
+
+				if(items.length == 2)
+					part[items[0]] = items[1];
+				else
+					part.automationName = text;
+
+				var ao:Array = automationManager.resolveIDPart(aoc, part);
+				var n:int = ao.length;
+				var delegate:IAutomationObject = (ao[0] as IAutomationObject);
+				if (delegate)
+					obj[pd.name] = delegate;
+				else
+					obj[pd.name] = ao[0];
+
+				if (n > 1)
+				{
+					var message:String = resourceManager.getString(
+						"automation_agent", "matchesMsg",[ ao.length,
+							part.toString().replace(/\n/, ' ')]) + ":\n";
+
+					for (var i:int = 0; i < n; i++)
+					{
+						message += AutomationClass.getClassName(ao[i]) +
+							"(" + ao[i].automationName + ")\n";
+					}
+
+					trace(message);
+				}
+
+				// we couldnot find the itemRenderer in the visible area
+				// set itemString property if it is available so that the
+				// delegate can handle this.
+				if (n == 0)
+				{
+					if (obj.hasOwnProperty("itemAutomationValue"))
+						obj["itemAutomationValue"] = text;
+				}
+			}
+		}
+	}
+
+}


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

--- frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 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.
 //
 ////////////////////////////////////////////////////////////////////////////////