Transferred from the Adobe Open Source Subversion Repository

Revision: 4496
Author:   rfrishbe@adobe.com
Date:     2009-01-13T07:52:44.833841Z

Log Message:
-----------
Cleanups in Group and DataGroup.  Change RTEs so not as many will have to be localized.  Also, when mxmlContent is set, we clean up the old mxmlContent better and send out remove events.

QE Notes: Need to write tests when the mxmlContent gets set (remove events get dispatched).
Doc Notes: None
Bugs: SDK-18501, SDK-18064
Reviewer: Jason, Glenn
tests: checkintests, mustella Group, DataGroup, FxDataContainer, FxContainer, FxList, and GraphicTags tests

Modified Paths:
--------------
<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/graphics/IGraphicElement.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/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -83,10 +83,7 @@
         super();
     }

-    private var mxmlContentChanged:Boolean = false;
     private var needsDisplayObjectAssignment:Boolean = false;
-
-    private var _mxmlContent:Array;
     private var layeringMode:uint = ITEM_ORDERED_LAYERING;
     private var numGraphicElements:uint = 0;

@@ -203,6 +200,10 @@
     //  mxmlContent
     //----------------------------------

+    private var mxmlContentChanged:Boolean = false;
+    private var _mxmlContent:Array;
+    private var _oldMxmlContent:Array;
+
     [ArrayElementType("mx.core.IVisualElement")]
     /**
      *  Content for this Group.  Do not modify this array directly.
@@ -228,40 +229,40 @@
      */
     public function set mxmlContent(value:Array):void
     {
+        if (!mxmlContentChanged)
+            _oldMxmlContent = _mxmlContent;
         _mxmlContent = value;
         mxmlContentChanged = true;
-        maskChanged = true;
         invalidateProperties();
-        invalidateDisplayList();
     }

     /**
      *  Adds the elements in mxmlContent to the Group.
      *  Flex calls this method automatically; you do not call it directly.
      */
-    protected function initializeChildrenArray():void
-    {
-        // Get rid of existing display object children.
-        // !!!!! This should probably be done through change notification
-        // TODO!! This should be removing the last child b/c we want to
-        // send an event for each content child. This logic will send
-        // remove event for the 0th content child x times.
-        for (var idx:int = numChildren; idx > 0; idx--)
-            //itemRemoved(0);
-            super.removeChildAt(0);
-
-        numGraphicElements = 0;
-
-        if (_mxmlContent !== null)
-        {
-            for (var i:int = 0; i < numElements; i++)
-            {
-                elementAdded(getElementAt(i), i);
-            }
-        }
-
-        assignDisplayObjects();
-        needsDisplayObjectAssignment = false;
+    protected function validateMxmlContent():void
+    {
+        mxmlContentChanged = false;
+        var i:int;
+
+        if (_oldMxmlContent != null)
+        {
+            for (i = _oldMxmlContent.length - 1; i >= 0; i--)
+            {
+                elementRemoved(_oldMxmlContent[i], i);
+            }
+        }
+
+        _oldMxmlContent = null;
+
+        if (_mxmlContent != null)
+        {
+            var n:int = _mxmlContent.length;
+            for (i = 0; i < n; i++)
+            {
+                elementAdded(_mxmlContent[i], i);
+            }
+        }
     }

     /**
@@ -269,16 +270,10 @@
      */
     override protected function commitProperties():void
     {
+        super.commitProperties();
+
         if (mxmlContentChanged)
-        {
-            mxmlContentChanged = false;
-            initializeChildrenArray();
-        }
-
-        // Need to initializeChildrenArray before calling super.commitProperties
-        // initializeChildrenArray removes all of the display list children.
-        // GroupBase's commitProperties reattaches the mask
-        super.commitProperties();
+            validateMxmlContent();

         if (blendModeChanged)
         {
@@ -521,14 +516,12 @@

         // If we don't have any content yet, initialize it to an empty array
         if (_mxmlContent == null)
-        {
-            mxmlContent = [];
-            mxmlContentChanged = false;
-        }
+            _mxmlContent = [];

         _mxmlContent.splice(index, 0, element);

-        elementAdded(element, index);
+        if (!mxmlContentChanged)
+            elementAdded(element, index);

         return element;
     }
@@ -549,16 +542,15 @@
         // check RangeError
         checkForRangeError(index);

-        var element:IVisualElement;
+        var element:IVisualElement = _mxmlContent[index];

         // Need to call elementRemoved before removing the item so anyone listening
         // for the event can access the item.

-        elementRemoved(index);
-
-        var removed:Array = _mxmlContent.splice(index, 1);
-        if (removed && removed.length > 0)
-            element = removed[0];
+        if (!mxmlContentChanged)
+            elementRemoved(element, index);
+
+        _mxmlContent.splice(index, 1);

         return element;
     }
@@ -697,7 +689,7 @@
             // if the display object ordering is invalidated (because we have graphic elements
             // that aren't actually in the display list), then lets just add our item to the end.
             // If the ordering isn't invalidated, then let's just try to add it to the proper index.
-            if (invalidateDisplayObjectOrdering() || mxmlContentChanged)
+            if (invalidateDisplayObjectOrdering())
             {
                 // This always adds the child to the end of the display list. Any
                 // ordering discrepancies will be fixed up in assignDisplayObjects().
@@ -722,23 +714,22 @@
      *
      *  @param index The index of the item that is being removed.
      */
-    mx_internal function elementRemoved(index:int):void
-    {
-        var element:IVisualElement = getElementAt(index);
+    mx_internal function elementRemoved(element:IVisualElement, index:int):void
+    {
         var childDO:DisplayObject = element as DisplayObject;

         dispatchEvent(new ItemExistenceChangedEvent(
-                      ItemExistenceChangedEvent.ITEM_REMOVE, false, false, element, index));
+                      ItemExistenceChangedEvent.ITEM_REMOVE, false, false, element, index));
+
         if (element && (element is IGraphicElement))
         {
             numGraphicElements--;
-            IGraphicElement(element).parentChanged(null);
-            IGraphicElement(element).sharedDisplayObject = null;
-            childDO = IGraphicElement(element).displayObject;
-        }
-
-        if (childDO && childDO.parent == this)
+            removingGraphicElementChild(element as IGraphicElement);
+        }
+        else if (childDO && childDO.parent == this)
+        {
             super.removeChild(childDO);
+        }

         invalidateDisplayObjectOrdering();
         invalidateSize();
@@ -770,6 +761,18 @@
         // but some need to react to even this early change.
         if (child is TextGraphicElement)
             TextGraphicElement(child).stylesInitialized();
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function removingGraphicElementChild(child:IGraphicElement):void
+    {
+        child.parentChanged(null);
+        child.sharedDisplayObject = null;
+
+        if (child.displayObject)
+            super.removeChild(child.destroyDisplayObject());
     }

     /**
@@ -934,11 +937,7 @@
                 // Item should be assigned the currentAssignableDO
                 // If it already has a DO, we need to remove it
                 if (graphicElement.displayObject)
-                {
-                    if (graphicElement.displayObject.parent == this)
-                        super.removeChild(graphicElement.displayObject);
-                    graphicElement.destroyDisplayObject();
-                }
+                    super.removeChild(graphicElement.destroyDisplayObject());

                 graphicElement.sharedDisplayObject = mergeData.currentAssignableDO;
                 if (graphicElement.nextSiblingNeedsDisplayObject)
@@ -968,8 +967,7 @@
         if (host && host is IVisualElementContainer && host != this)
             IVisualElementContainer(host).removeElement(element);

-
-        // Calling removeItem should have already removed the child. This
+        // Calling removeElement should have already removed the child. This
         // should handle the case when we don't call removeItem
         if (child.parent)
         {
@@ -1011,12 +1009,13 @@
     //--------------------------------------------------------------------------

     private var scaleGridChanged:Boolean = false;
+
+    // store the scaleGrid into a rectangle to save space (top, left, bottom, right);
+    private var scaleGridStorageVariable:Rectangle;

     //----------------------------------
     //  scaleGridBottom
     //----------------------------------
-
-    private var _scaleGridBottom:Number;

     [Inspectable(category="General")]

@@ -1025,14 +1024,20 @@
      */
     public function get scaleGridBottom():Number
     {
-        return _scaleGridBottom;
+        if (scaleGridStorageVariable)
+            return scaleGridStorageVariable.height;
+
+        return NaN;
     }

     public function set scaleGridBottom(value:Number):void
-    {
-        if (value != _scaleGridBottom)
-        {
-            _scaleGridBottom = value;
+    {
+        if (!scaleGridStorageVariable)
+            scaleGridStorageVariable = new Rectangle(NaN, NaN, NaN, NaN);
+
+        if (value != scaleGridStorageVariable.height)
+        {
+            scaleGridStorageVariable.height = value;
             scaleGridChanged = true;
             invalidateDisplayList();
         }
@@ -1041,8 +1046,6 @@
     //----------------------------------
     //  scaleGridLeft
     //----------------------------------
-
-    private var _scaleGridLeft:Number;

     [Inspectable(category="General")]

@@ -1051,24 +1054,29 @@
      */
     public function get scaleGridLeft():Number
     {
-        return _scaleGridLeft;
+        if (scaleGridStorageVariable)
+            return scaleGridStorageVariable.x;
+
+        return NaN;
     }

     public function set scaleGridLeft(value:Number):void
     {
-        if (value != _scaleGridLeft)
-        {
-            _scaleGridLeft = value;
+        if (!scaleGridStorageVariable)
+            scaleGridStorageVariable = new Rectangle(NaN, NaN, NaN, NaN);
+
+        if (value != scaleGridStorageVariable.x)
+        {
+            scaleGridStorageVariable.x = value;
             scaleGridChanged = true;
             invalidateDisplayList();
         }
+
     }

     //----------------------------------
     //  scaleGridRight
     //----------------------------------
-
-    private var _scaleGridRight:Number;

     [Inspectable(category="General")]

@@ -1077,24 +1085,29 @@
      */
     public function get scaleGridRight():Number
     {
-        return _scaleGridRight;
+        if (scaleGridStorageVariable)
+            return scaleGridStorageVariable.width;
+
+        return NaN;
     }

     public function set scaleGridRight(value:Number):void
     {
-        if (value != _scaleGridRight)
-        {
-            _scaleGridRight = value;
+        if (!scaleGridStorageVariable)
+            scaleGridStorageVariable = new Rectangle(NaN, NaN, NaN, NaN);
+
+        if (value != scaleGridStorageVariable.width)
+        {
+            scaleGridStorageVariable.width = value;
             scaleGridChanged = true;
             invalidateDisplayList();
         }
+
     }

     //----------------------------------
     //  scaleGridTop
     //----------------------------------
-
-    private var _scaleGridTop:Number;

     [Inspectable(category="General")]

@@ -1103,73 +1116,129 @@
      */
     public function get scaleGridTop():Number
     {
-        return _scaleGridTop;
+        if (scaleGridStorageVariable)
+            return scaleGridStorageVariable.y;
+
+        return NaN;
     }

     public function set scaleGridTop(value:Number):void
     {
-        if (value != _scaleGridTop)
-        {
-            _scaleGridTop = value;
+        if (!scaleGridStorageVariable)
+            scaleGridStorageVariable = new Rectangle(NaN, NaN, NaN, NaN);
+
+        if (value != scaleGridStorageVariable.y)
+        {
+            scaleGridStorageVariable.y = value;
             scaleGridChanged = true;
             invalidateDisplayList();
         }
-    }
-
-    /**
-     *  @private
+
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  Group supports non-DisplayObject children (IGraphicElements) as well
+     *  as DisplayObject children.  Group manages its own display objects,
+     *  and you should not call addChild() directly.  Instead, use
+     *  addElement().
+     *
+     *  @see mx.components.Group#addElement
      */
     override public function addChild(child:DisplayObject):DisplayObject
     {
-        throw(new Error("addChild is not available in Group. Use addItem instead."));
-    }
-
-    /**
-     *  @private
+        throw(new Error("This method is not available in this class.  Please consult the documentation."));
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  Group supports non-DisplayObject children (IGraphicElements) as well
+     *  as DisplayObject children.  Group manages its own display objects,
+     *  and you should not call addChildAt() directly.  Instead, use
+     *  addElementAt().
+     *
+     *  @see mx.components.Group#addElementAt
      */
     override public function addChildAt(child:DisplayObject, index:int):DisplayObject
     {
-        throw(new Error("addChildAt is not available in Group. Use addItemAt instead."));
-    }
-
-    /**
-     *  @private
+        throw(new Error("This method is not available in this class.  Please consult the documentation."));
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  Group supports non-DisplayObject children (IGraphicElements) as well
+     *  as DisplayObject children.  Group manages its own display objects,
+     *  and you should not call removeChild() directly.  Instead, use
+     *  removeElement().
+     *
+     *  @see mx.components.Group#removeElement
      */
     override public function removeChild(child:DisplayObject):DisplayObject
     {
-        throw(new Error("removeChild is not available in Group. Use removeItem instead."));
-    }
-
-    /**
-     *  @private
+        throw(new Error("This method is not available in this class.  Please consult the documentation."));
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  Group supports non-DisplayObject children (IGraphicElements) as well
+     *  as DisplayObject children.  Group manages its own display objects,
+     *  and you should not call removeChildAt() directly.  Instead, use
+     *  removeElementAt().
+     *
+     *  @see mx.components.Group#removeElementAt
      */
     override public function removeChildAt(index:int):DisplayObject
     {
-        throw(new Error("removeChildAt is not available in Group. Use removeItemAt instead."));
-    }
-
-    /**
-     *  @private
+        throw(new Error("This method is not available in this class.  Please consult the documentation."));
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  Group supports non-DisplayObject children (IGraphicElements) as well
+     *  as DisplayObject children.  Group manages its own display objects,
+     *  and you should not call setChildIndex() directly.  Instead, use
+     *  setElementIndex().
+     *
+     *  @see mx.components.Group#setElementIndex
      */
     override public function setChildIndex(child:DisplayObject, index:int):void
     {
-        throw(new Error("setChildIndex is not available in Group. Use setItemIndex instead."));
-    }
-
-    /**
-     *  @private
+        throw(new Error("This method is not available in this class.  Please consult the documentation."));
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  Group supports non-DisplayObject children (IGraphicElements) as well
+     *  as DisplayObject children.  Group manages its own display objects,
+     *  and you should not call swapChildren() directly.  Instead, use
+     *  swapElements().
+     *
+     *  @see mx.components.Group#swapElements
      */
     override public function swapChildren(child1:DisplayObject, child2:DisplayObject):void
     {
-        throw(new Error("swapChildren is not available in Group. Use swapItems instead."));
-    }
-
-    /**
-     *  @private
+        throw(new Error("This method is not available in this class.  Please consult the documentation."));
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  Group supports non-DisplayObject children (IGraphicElements) as well
+     *  as DisplayObject children.  Group manages its own display objects,
+     *  and you should not call swapChildrenAt() directly.  Instead, use
+     *  swapElementsAt().
+     *
+     *  @see mx.components.Group#swapElementsAt
      */
     override public function swapChildrenAt(index1:int, index2:int):void
     {
-        throw(new Error("swapChildrenAt is not available in Group. Use swapItemsAt instead."));
+        throw(new Error("This method is not available in this class.  Please consult the documentation."));
     }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 17316
Author:   klin@adobe.com
Date:     2010-08-13T19:04:51.716189Z

Log Message:
-----------
Fix batch of bugs in DataGrid and also add basic border and background styles.

DataGrid.as - Added style metadata for borderAlpha, borderColor, borderVisible, contentBackgroundAlpha, and contentBackgroundColor.
Grid.as - Add backing variable for variableRowHeight so it doesn't depend on gridDimensions.fixedRowHeight anymore.
GridLayout.as - Modified updateTypicalCellSizes() to set the fixedRowHeight to the maximum height of the typical cells when no rowHeight is set and variableRowHeight is false. Also, measuredHeight is now calculated only using the typical item instead of the content.
GridDimensions.as - Added getTypicalContentHeight() for GridLayout to calculate the measuredHeight. Also, we now reset the data structure when the columnCount is 0.
GridColumn.as - Invalidate the grid when dataField and labelFunction are set.
GridEvent.as - Fixed misspelled event constants.
DataGridSkin.mxml - Changed background color to white, caret color to dark blue, and removed the rowBackground.

QE notes: No
Doc notes: No
Bugs: SDK-26895, SDK-26897, SDK-26934, SDK-27166, SDK-27170, SDK-27176, SDK-27216, SDK-27264
Reviewer: Hans
Tests run: checkintests, DataGrid
Is noteworthy for integration: No

Modified Paths:
--------------
<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/events/GridEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridDimensions.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.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/skins/spark/DataGridSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/events/GridEvent.as
+++ frameworks/projects/spark/src/spark/events/GridEvent.as
@@ -148,8 +148,8 @@
     public static const SEPARATOR_CLICK:String = "separatorClick";
     public static const SEPARATOR_MOUSE_DOWN:String = "separatorMouseDown";
     public static const SEPARATOR_MOUSE_UP:String = "separatorMouseUp";
-    public static const SEPARATOR_ROLL_OUT:String = "separatorOut";
-    public static const SEPARATOR_ROLL_OVER:String = "separatorOver";
+    public static const SEPARATOR_ROLL_OUT:String = "separatorRollOut";
+    public static const SEPARATOR_ROLL_OVER:String = "separatorRollOver";

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


- Added TODO for DeluxeSignal - Minor changes to DeluxeSignal (syntax sugar, clarification, got rid of some " as "-casts)

--- src/org/osflash/signals/DeluxeSignal.as
+++ src/org/osflash/signals/DeluxeSignal.as
@@ -23,6 +23,7 @@
 	 */
 	public class DeluxeSignal implements ISignalOwner, IPrioritySignal
 	{
+		//todo inconsistent naming
 		protected var _target:Object;
 		protected var _valueClasses:Array;
 		protected var listenerBoxes:Array;
@@ -44,7 +45,8 @@
 		{
 			_target = target;
 			listenerBoxes = [];
-			// Cannot use super.apply(null, valueClasses), so allow the subclass to call super(valueClasses).
+			// Cannot use super.apply(null, valueClasses),
+			// so allow the subclass to call super(valueClasses).
 			if (valueClasses.length == 1 && valueClasses[0] is Array)
 				valueClasses = valueClasses[0];
 			this.valueClasses = valueClasses;
@@ -56,14 +58,19 @@
 		/** @inheritDoc */
 		public function set valueClasses(value:Array):void
 		{
+			//todo when setting null we create a new array, why?
+
 			// Clone so the Array cannot be affected from outside.
 			_valueClasses = value ? value.slice() : [];
-			for (var i:int = _valueClasses.length; i--; )
+
+			var i:int = _valueClasses.length;
+			while(--i > -1)
 			{
 				if (!(_valueClasses[i] is Class))
 				{
-					throw new ArgumentError('Invalid valueClasses argument: item at index ' + i
-						+ ' should be a Class but was:<' + _valueClasses[i] + '>.');
+					throw new ArgumentError('Invalid valueClasses argument: ' +
+						'item at index ' + i + ' should be a Class but was:<' +
+						_valueClasses[i] + '>.');
 				}
 			}
 		}
@@ -123,10 +130,13 @@
 		/** @inheritDoc */
 		public function removeAll():void
 		{
+			//todo see org.osflash.signals.Signal#removeAll
+
 			// Looping backwards is more efficient when removing array items.
-			for (var i:uint = listenerBoxes.length; i--; )
-			{
-				remove(listenerBoxes[i].listener as Function);
+			var i:int = listenerBoxes.length;
+			while(--i > -1)
+			{
+				remove(Function(listenerBoxes[i].listener));
 			}
 		}

@@ -140,7 +150,7 @@
 			for (var i:int = 0; i < len; i++)
 			{
 				// null is allowed to pass through.
-				if ( (valueObject = valueObjects[i]) === null
+				if ( (valueObject = valueObjects[i]) === null//todo why strict equality?
 					|| valueObject is (valueClass = _valueClasses[i]) )
 					continue;

@@ -154,6 +164,7 @@
 				// clone re-dispatched event
 				if (event.target)
 				{
+					//todo can we get rid of this somehow?
 					valueObjects[0] = event = event.clone();
 				}
 				event.target = this.target;
@@ -161,11 +172,12 @@
 				event.signal = this;
 			}

-			// During a dispatch, add() and remove() should clone listeners array instead of modifying it.
+			// During a dispatch, add() and remove() should clone listeners array
+			// instead of modifying it.
 			listenersNeedCloning = true;
 			//// Call listeners.
 			var listener:Function;
-			if (listenerBoxes.length)
+			if (listenerBoxes.length != 0)
 			{
 				//TODO: investigate performance of various approaches

@@ -184,6 +196,7 @@
 			//// Bubble the event as far as possible.
 			var currentTarget:Object = this.target;
 			while ( currentTarget && currentTarget.hasOwnProperty("parent")
+				//todo check if we can optimize this and hasOwnProperty is needed
 					&& (currentTarget = currentTarget.parent) )
 			{
 				if (currentTarget is IBubbleEventHandler)
@@ -212,7 +225,9 @@
 				var argumentString:String = (listener.length == 1) ? 'argument' : 'arguments';
 				throw new ArgumentError('Listener has '+listener.length+' '+argumentString+' but it needs at least '+_valueClasses.length+' to match the given value classes.');
 			}
-
+
+			//todo absolutely need to get rid of this
+			//todo replace with flyweight
 			var listenerBox:Object = { listener:listener, once:once, priority:priority };
 			// Process the first listener as quickly as possible.
 			if (!listenerBoxes.length)


There's no 'throws' in ActionScript, so essentially all exceptions are
runtime. The only way to learn what might be thrown is to read all the
documentation for a method. (Complaint suppressed.)
Anyway, let's cope if we encounter an error reading from our socket.

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

--- src/as/com/threerings/io/FrameReader.as
+++ src/as/com/threerings/io/FrameReader.as
@@ -25,6 +25,15 @@
      * Called when our socket has data that we can read.
      */
     protected function socketHasData (event :ProgressEvent) :void
+    {
+        try {
+            readAvailable();
+        } catch (e :Error) {
+            Log.getLog(this).warning("Error reading socket data [e=" + e + "].");
+        }
+    }
+
+    protected function readAvailable () :void
     {
         if (ObjectInputStream.DEBUG) {
             Log.getLog(this).debug(
@@ -64,7 +73,7 @@
             // there's a good chance there's more on the socket, recurse
             // now to read it
             if (_socket.bytesAvailable >= HEADER_SIZE) {
-                socketHasData(event);
+                readAvailable();
             }
         }
     }


Consistent buffer size.

Consistent buffer size.

--- src/org/zozuar/volumetrics/EffectContainer.as
+++ src/org/zozuar/volumetrics/EffectContainer.as
@@ -68,7 +68,6 @@
 			var aspect:Number = _viewportWidth / _viewportHeight;
 			_bufferHeight = Math.max(1, Math.sqrt(_bufferSize / aspect));
 			_bufferWidth  = Math.max(1, _bufferHeight * aspect);
-			_bufferSize = _bufferWidth * _bufferHeight;
 			dispose();
 			_emissionBmd  = new BitmapData(_bufferWidth, _bufferHeight, false, 0);
 			_buffBmd      = new BitmapData(_bufferWidth, _bufferHeight, false, 0);


Further work to fix premature validation pathway

--- as3/smartform/src/com/rpath/raf/util/ValidationHelper.as
+++ as3/smartform/src/com/rpath/raf/util/ValidationHelper.as
@@ -137,6 +137,11 @@

         public function clearErrorImmediately(target:UIComponent):void
         {
+            target.callLater(clearDeferred, [target]);
+        }
+
+        private function clearDeferred(target:UIComponent):void
+        {
             var oldDelay:Number = ToolTipManager.hideDelay;
             ToolTipManager.hideDelay = 0;
             if (target.visible)
@@ -149,7 +154,7 @@
                 }
                 catch (e:Error)
                 {
-                    // sometimes things are initialized fully when we try that trick
+                    // sometimes things aren't initialized fully when we try that trick
                 }
             }
             ToolTipManager.hideDelay = oldDelay;


Updated ASDoc comments for DataList

Updated ASDoc comments for DataList

git-svn-id: 6aa7ccb0a2048310a30f08a72aaff4ca39d980ed@65 91848ab2-c4ae-4e4f-8e6a-6a52ea0dccc3

--- flare.vis/flare/vis/data/DataList.as
+++ flare.vis/flare/vis/data/DataList.as
@@ -15,7 +15,11 @@
 	import flare.util.Sort;

 	/**
-	 * A list of nodes or edges maintained by a Data instance.
+	 * A list of nodes or edges maintained by a Data instance. Items contained
+	 * in this list can be accessed using array notation ([]),
+	 * iterated over using the for each construct, or can be
+	 * processed by passing a visitor function to the visit
+	 * method.
 	 */
 	public class DataList extends Proxy
 	{


Added isContentInitialized(), which should be used to help differentiate
between an MsoySprite that does not have any WhirledControl subclass in it
and those that do, but are just not yet fully loaded.

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

--- src/as/com/threerings/flash/MediaContainer.as
+++ src/as/com/threerings/flash/MediaContainer.as
@@ -95,6 +95,16 @@
     }

     /**
+     * Return true if the content has been initialized.
+     * For most content, this is true if the media is non-null, but
+     * for anything loaded with a Loader, it is only true after the INIT event is dispatched.
+     */
+    public function isContentInitialized () :Boolean
+    {
+        return (_media != null) && (_initialized || !(_media is Loader));
+    }
+
+    /**
      * Get the media. If the media was loaded using a URL, this will
      * likely be the Loader object holding the real media.
      */
@@ -158,7 +168,7 @@
      */
     protected function willShowNewMedia () :void
     {
-        // nada in here
+        _initialized = false;
     }

     /**
@@ -186,6 +196,7 @@
         _media = loader;
         var info :LoaderInfo = loader.contentLoaderInfo;
         info.addEventListener(Event.COMPLETE, loadingComplete);
+        info.addEventListener(Event.INIT, handleInit);
         info.addEventListener(IOErrorEvent.IO_ERROR, loadError);
         info.addEventListener(ProgressEvent.PROGRESS, loadProgress);

@@ -398,6 +409,7 @@
     protected function removeListeners (info :LoaderInfo) :void
     {
         info.removeEventListener(Event.COMPLETE, loadingComplete);
+        info.removeEventListener(Event.INIT, handleInit);
         info.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
         info.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
     }
@@ -446,6 +458,14 @@
     }

     /**
+     * Handles the INIT event for content loaded with a Loader.
+     */
+    protected function handleInit (event :Event) :void
+    {
+        _initialized = true;
+    }
+
+    /**
      * Callback function to receive COMPLETE events for swfs or images.
      */
     protected function loadingComplete (event :Event) :void
@@ -560,5 +580,8 @@

     /** Either a Loader or a VideoDisplay. */
     protected var _media :DisplayObject;
+
+    /** If we're using a Loader, true once the INIT property has been dispatched. */
+    protected var _initialized :Boolean;
 }
 }


Cleaned up grouped callback code and made it so a grouped callback can no longer be called immediately due to being triggered by another grouped callback.

--- WeaveCore/src/weave/core/CallbackCollection.as
+++ WeaveCore/src/weave/core/CallbackCollection.as
@@ -91,10 +91,6 @@
 		 */
 		private var _triggerCounter:uint = DEFAULT_TRIGGER_COUNT;

-		private static const STACK_TRACE_TRIGGER:String = "This is the stack trace from when the callbacks were last triggered.";
-		private static const STACK_TRACE_ADD:String = "This is the stack trace from when the callback was added.";
-		private static const STACK_TRACE_REMOVE:String = "This is the stack trace from when the callback was removed.";
-
 		/**
 		 * @inheritDoc
 		 */
@@ -106,16 +102,10 @@
 			// remove the callback if it was previously added
 			removeCallback(callback);

-			var entry:CallbackEntry = new CallbackEntry();
-			_callbackEntries.push(entry);
-			entry.context = relevantContext;
-			entry.callback = callback;
-			entry.recursionLimit = 0;
+			var entry:CallbackEntry = new CallbackEntry(relevantContext, callback);
 			if (alwaysCallLast)
 				entry.schedule = 1;
-
-			if (debug)
-				entry.addCallback_stackTrace = new Error(STACK_TRACE_ADD).getStackTrace();
+			_callbackEntries.push(entry);

 			// run callback now if requested
 			if (runCallbackNow)
@@ -200,9 +190,10 @@
 						continue;
 					}
 					// if _preCallback is specified, we don't want to limit recursion because that would cause a loss of information.
-					if (entry.recursionCount <= entry.recursionLimit || _preCallback != null)
+					if (entry.recursionCount == 0 || _preCallback != null)
 					{
 						entry.recursionCount++; // increase count to signal that we are currently running this callback.
+
 						if (_preCallback != null)
 							_preCallback.apply(null, preCallbackParams);

@@ -223,9 +214,7 @@
 		public final function removeCallback(callback:Function):void
 		{
 			// if the callback was added as a grouped callback, we need to remove the trigger function
-			var triggerCallbackEntry:CallbackEntry = _groupedCallbackToTriggerEntryMap[callback] as CallbackEntry;
-			if (triggerCallbackEntry != null)
-				removeCallback(triggerCallbackEntry.callback);
+			GroupedCallbackEntry.removeGroupedCallback(this, callback);

 			// find the matching CallbackEntry, if any
 			for (var outerLoop:int = 0; outerLoop < 2; outerLoop++)
@@ -288,20 +277,12 @@
 		 */
 		public function addDisposeCallback(relevantContext:Object, callback:Function):void
 		{
-			var entry:CallbackEntry;
-
 			// don't do anything if the dispose callback was already added
-			for each (entry in _disposeCallbackEntries)
+			for each (var entry:CallbackEntry in _disposeCallbackEntries)
 				if (entry.callback === callback)
 					return;

-			entry = new CallbackEntry();
-			_disposeCallbackEntries.push(entry);
-			entry.context = relevantContext;
-			entry.callback = callback;
-
-			if (debug)
-				entry.addCallback_stackTrace = new Error(STACK_TRACE_ADD).getStackTrace();
+			_disposeCallbackEntries.push(new CallbackEntry(relevantContext, callback));
 		}

 		/**
@@ -341,144 +322,42 @@
 		{
 			return _wasDisposed;
 		}
-
-		/**
-		 * This is set to true while grouped callbacks are running.
-		 */
-		private static var _runningGroupedCallbacksNow:Boolean = false;
-
-		/**
-		 * This maps a grouped callback function to its corresponding CallbackEntry object containing a trigger function for that callback.
-		 * A different trigger function is required for each callback because CallbackCollection will only keep one copy of the pointer to
-		 * any given function.
-		 */
-		private static const _groupedCallbackToTriggerEntryMap:Dictionary = new Dictionary();
-
-		/**
-		 * This Dictionary maps a grouped callback trigger CallbackEntry to a value of true that means the callback was triggered.
-		 */
-		private static const _triggeredGroupedCallbackEntryMap:Dictionary = new Dictionary(true);
-
-		/**
-		 * This is a list of the grouped CallbackEntry objects in the order they were triggered.
-		 */
-		private static const _triggeredGroupedCallbackEntryOrderedList:Array = new Array();
-
-		/**
-		 * This variable is false until the handleEnterFrame callback has been added through StageUtils.
-		 */
-		private static var _frameCallbackAdded:Boolean = false;
-
-		/**
-		 * This function gets called once per frame and allows grouped callbacks to run.
-		 */
-		private static function _handleGroupedCallbacks():void
-		{
-			// this flag tells all trigger functions to run their corresponding callbacks immediately
-			_runningGroupedCallbacksNow = true;
-
-			while (_triggeredGroupedCallbackEntryOrderedList.length > 0)
-			{
-				// run grouped callbacks in the order they were triggered
-				var triggerEntry:CallbackEntry = _triggeredGroupedCallbackEntryOrderedList.shift() as CallbackEntry;
-				(triggerEntry as CallbackEntry).callback();
-				delete _triggeredGroupedCallbackEntryMap[triggerEntry];
-			}
-
-			_runningGroupedCallbacksNow = false;
-		}

 		/**
 		 * @inheritDoc
 		 */
 		public function addGroupedCallback(relevantContext:Object, groupedCallback:Function, triggerCallbackNow:Boolean = false):void
 		{
-			if (!_frameCallbackAdded)
-			{
-				WeaveAPI.StageUtils.addEventCallback(Event.ENTER_FRAME, null, _handleGroupedCallbacks);
-				_frameCallbackAdded = true;
-			}
-
-			if (relevantContext == null)
-				relevantContext = this;
-
-			var recursionLimit:uint = 0;
-			var triggerEntry:CallbackEntry = _groupedCallbackToTriggerEntryMap[groupedCallback] as CallbackEntry;
-			if (triggerEntry != null)
-			{
-				// add this context to the list of relevant contexts
-				triggerEntry.context.push(relevantContext);
-				// use the minimum of the existing limit and the new limit.
-				triggerEntry.recursionLimit = Math.min(triggerEntry.recursionLimit, recursionLimit);
-			}
-			else // need to create new shared CallbackEntry for this grouped callback
-			{
-				triggerEntry = new CallbackEntry();
-				_groupedCallbackToTriggerEntryMap[groupedCallback] = triggerEntry;
-				triggerEntry.recursionLimit = recursionLimit;
-				triggerEntry.context = [relevantContext]; // the context in this entry will be an array of contexts
-				if (debug)
-					triggerEntry.addCallback_stackTrace = new Error(STACK_TRACE_ADD).getStackTrace();
-				triggerEntry.callback = function():void
-				{
-					if (_runningGroupedCallbacksNow)
-					{
-						// first, make sure there is at least one relevant context for this callback.
-						var allContexts:Array = triggerEntry.context as Array;
-						// remove the contexts that have been disposed of.
-						for (var i:int = 0; i < allContexts.length; i++)
-							if (WeaveAPI.SessionManager.objectWasDisposed(allContexts[i]))
-								allContexts.splice(i--, 1);
-						// if there are no more relevant contexts for this callback, don't run it.
-						if (allContexts.length == 0)
-						{
-							triggerEntry.callback = null; // help the garbage-collector a bit
-							if (debug)
-								triggerEntry.removeCallback_stackTrace = new Error(STACK_TRACE_REMOVE).getStackTrace();
-							delete _groupedCallbackToTriggerEntryMap[groupedCallback];
-							return;
-						}
-
-						// this function was called as a result of calling groupedCallback().
-						// enforce recursion limit now.
-						if (triggerEntry.recursionCount <= triggerEntry.recursionLimit)
-						{
-							// increase recursion count while the function is running.
-							triggerEntry.recursionCount++;
-
-							groupedCallback();
-
-							triggerEntry.recursionCount--;
-						}
-					}
-					else if (_triggeredGroupedCallbackEntryMap[triggerEntry] === undefined) // if not already triggered
-					{
-						// set a flag to signal that this grouped callback was triggered.
-						_triggeredGroupedCallbackEntryMap[triggerEntry] = true;
-						_triggeredGroupedCallbackEntryOrderedList.push(triggerEntry);
-					}
-				};
-			}
-			// make sure the actual function is not already added as a callback.
-			removeCallback(groupedCallback);
-
-			// prevent grouped callback from running immediately because that is unexpected
-			var _previouslyRunningGroupedCallbacks:Boolean = _runningGroupedCallbacksNow;
-			_runningGroupedCallbacksNow = false;
-
-			// add the trigger function as a callback
-			addImmediateCallback(relevantContext, triggerEntry.callback, triggerCallbackNow);
-
-			_runningGroupedCallbacksNow = _previouslyRunningGroupedCallbacks;
+			GroupedCallbackEntry.addGroupedCallback(this, relevantContext, groupedCallback, triggerCallbackNow);
 		}
 	}
 }
+
+internal const STACK_TRACE_TRIGGER:String = "This is the stack trace from when the callbacks were last triggered.";
+internal const STACK_TRACE_ADD:String = "This is the stack trace from when the callback was added.";
+internal const STACK_TRACE_REMOVE:String = "This is the stack trace from when the callback was removed.";
+
+import flash.events.Event;
+import flash.utils.Dictionary;
+
+import weave.api.WeaveAPI;
+import weave.api.core.ICallbackCollection;
+import weave.core.CallbackCollection;

 /**
  * @private
  */
 internal class CallbackEntry
 {
+	public function CallbackEntry(context:Object, callback:Function)
+	{
+		this.context = context;
+		this.callback = callback;
+
+		if (CallbackCollection.debug)
+			addCallback_stackTrace = new Error(STACK_TRACE_ADD).getStackTrace();
+	}
+
 	/**
 	 * This is the context in which the callback function is relevant.
 	 * When the context is disposed of, the callback should not be called anymore.
@@ -498,10 +377,6 @@
 	 */
 	public var callback:Function = null;
 	/**
-	 * This is the maximum recursion depth allowed for this callback.
-	 */
-	public var recursionLimit:uint = 0;
-	/**
 	 * This is the current recursion depth.
 	 * If this is greater than zero, it means the function is currently running.
 	 */
@@ -519,3 +394,124 @@
 	 */
 	public var removeCallback_stackTrace:String = null;
 }
+
+/**
+ * @private
+ */
+internal class GroupedCallbackEntry extends CallbackEntry
+{
+	public static function addGroupedCallback(callbackCollection:ICallbackCollection, relevantContext:Object, groupedCallback:Function, triggerCallbackNow:Boolean):void
+	{
+		// get (or create) the shared entry for the groupedCallback
+		var entry:GroupedCallbackEntry = _entryLookup[groupedCallback] as GroupedCallbackEntry;
+		if (!entry)
+			_entryLookup[groupedCallback] = entry = new GroupedCallbackEntry(groupedCallback);
+
+		// context shouldn't be null because we use it to determine when to clean up the GroupedCallbackEntry.
+		if (relevantContext == null)
+			relevantContext = callbackCollection;
+
+		// add this context to the list of relevant contexts
+		(entry.context as Array).push(relevantContext);
+
+		// make sure the actual function is not already added as a callback.
+		callbackCollection.removeCallback(groupedCallback);
+
+		// add the trigger function as a callback
+		callbackCollection.addImmediateCallback(relevantContext, entry.trigger, triggerCallbackNow);
+	}
+
+	public static function removeGroupedCallback(callbackCollection:ICallbackCollection, groupedCallback:Function):void
+	{
+		// remove the trigger function as a callback
+		var entry:GroupedCallbackEntry = _entryLookup[groupedCallback] as GroupedCallbackEntry;
+		if (entry)
+			callbackCollection.removeCallback(entry.trigger);
+	}
+
+	/**
+	 * This function gets called once per frame and allows grouped callbacks to run.
+	 */
+	public static function _handleGroupedCallbacks():void
+	{
+		// handle grouped callbacks in the order they were triggered
+		while (_triggeredEntries.length)
+			(_triggeredEntries.shift() as GroupedCallbackEntry).handleGroupedCallback();
+	}
+
+	/**
+	 * This gets set to true when the static _handleGroupedCallbacks() callback has been added as a frame listener.
+	 */
+	private static var _initialized:Boolean = false;
+
+	/**
+	 * This maps a groupedCallback function to its corresponding GroupedCallbackEntry.
+	 */
+	private static const _entryLookup:Dictionary = new Dictionary();
+
+	/**
+	 * This is a list of GroupedCallbackEntry objects in the order they were triggered.
+	 */
+	private static const _triggeredEntries:Array = [];
+
+	/**
+	 * Constructor
+	 */
+	public function GroupedCallbackEntry(groupedCallback:Function)
+	{
+		// context will be an array of contexts
+		super([], groupedCallback);
+
+		if (!_initialized)
+		{
+			WeaveAPI.StageUtils.addEventCallback(Event.ENTER_FRAME, null, _handleGroupedCallbacks);
+			_initialized = true;
+		}
+	}
+
+	/**
+	 * If true, the callback was triggered this frame.
+	 */
+	public var triggered:Boolean = false;
+
+	/**
+	 * Marks the entry to be handled later (unless already triggered this frame).
+	 * This also takes care of preventing recursion.
+	 */
+	public function trigger():void
+	{
+		if (!triggered)
+		{
+			_triggeredEntries.push(this);
+			triggered = true;
+		}
+	}
+
+	/**
+	 * Checks the context(s) before calling groupedCallback
+	 */
+	public function handleGroupedCallback():void
+	{
+		// first, make sure there is at least one relevant context for this callback.
+		var allContexts:Array = context as Array;
+		// remove the contexts that have been disposed of.
+		for (var i:int = 0; i < allContexts.length; i++)
+			if (WeaveAPI.SessionManager.objectWasDisposed(allContexts[i]))
+				allContexts.splice(i--, 1);
+		// if there are no more relevant contexts for this callback, don't run it.
+		if (allContexts.length == 0)
+		{
+			if (CallbackCollection.debug)
+				removeCallback_stackTrace = new Error(STACK_TRACE_REMOVE).getStackTrace();
+			// clean up and remove this entry
+			callback = null; // help the garbage-collector a bit
+			delete _entryLookup[callback];
+			return;
+		}
+
+		callback();
+
+		// to avoid recursion, reset triggered state as the very last step
+		triggered = false;
+	}
+}


Fix for export directory not updating.

Fix for export directory not updating.

--- exporter/src/main/as/flump/export/Exporter.as
+++ exporter/src/main/as/flump/export/Exporter.as
@@ -186,6 +186,7 @@
         _importChooser.changed.add(setImport);
         _exportChooser = new DirChooser(null, _win.exportRoot, _win.browseExport);
         _exportChooser.changed.add(updatePreviewAndExport);
+
         function updatePublisher (..._) :void {
             if (_confFile != null) {
                 _importChooser.dir = (_conf.importDir != null) ? _confFile.parent.resolvePath(_conf.importDir) : null;
@@ -201,7 +202,6 @@
             for each (var export :ExportConf in _conf.exports) formatNames.push(export.name);
             _win.formatOverview.text = formatNames.join(", ");
         };
-        _exportChooser.changed.add(updatePublisher);

         var editFormats :EditFormatsWindow;
         _win.editFormats.addEventListener(MouseEvent.CLICK, function (..._) :void {


Transferred from the Adobe Open Source Subversion Repository

Revision: 2905
Author:   clucier@adobe.com
Date:     2008-08-19T20:45:59.993275Z

Log Message:
-----------
Changes to allow UIComponent to take advantage of the new bindable filters (bindable wrappers around DropShadowFilter, GlowFilter, etc. that will force the filter stack to be re-evaluated when one or more of the filter parameters change). Checkin-tests: PASS
Reviewer: Jason
Bugs: SDK-16311
QA: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Parser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/ConvolutionFilter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BaseDimensionFilter.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BaseDimensionFilter.as" copyfrom-rev="2873" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/IBitmapFilter.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/IBitmapFilter.as" copyfrom-rev="2873" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/GradientFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BaseFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/BaseFilter.as" copyfrom-rev="2873" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseFilter.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -50,6 +50,8 @@
 import mx.events.StateChangeEvent;
 import mx.events.ToolTipEvent;
 import mx.events.ValidationResultEvent;
+import mx.filters.BaseFilter;
+import mx.filters.IBitmapFilter;
 import mx.graphics.RoundedRectangle;
 import mx.managers.CursorManager;
 import mx.managers.ICursorManager;
@@ -2041,24 +2043,33 @@
             {
                 e = _filters[i] as IEventDispatcher;
                 if (e)
-                    e.removeEventListener("change", filterChangeHandler);
+                    e.removeEventListener(BaseFilter.CHANGE, filterChangeHandler);
             }
         }

         _filters = value;

+        var clonedFilters:Array = [];
         if (_filters)
         {
             n = _filters.length;
             for (i = 0; i < n; i++)
             {
-                e = _filters[i] as IEventDispatcher;
-                if (e)
-                    e.addEventListener("change", filterChangeHandler);
+                if (_filters[i] is IBitmapFilter)
+                {
+                    e = _filters[i] as IEventDispatcher;
+                    if (e)
+                        e.addEventListener(BaseFilter.CHANGE, filterChangeHandler);
+                    clonedFilters.push(IBitmapFilter(_filters[i]).clone());
+                }
+                else
+                {
+                    clonedFilters.push(_filters[i]);
+                }
             }
-       }
-
-        super.filters = _filters;
+        }
+
+        super.filters = clonedFilters;
     }

     //--------------------------------------------------------------------------
@@ -8950,7 +8961,7 @@
      */
     private function filterChangeHandler(event:Event):void
     {
-        super.filters = _filters;
+        filters = _filters;
     }

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


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

--- frameworks/projects/framework/src/mx/events/DragEvent.as
+++ frameworks/projects/framework/src/mx/events/DragEvent.as
@@ -0,0 +1,332 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events
+{
+
+import flash.events.Event;
+import flash.events.MouseEvent;
+import mx.core.DragSource;
+import mx.core.IUIComponent;
+
+/**
+ *  The DragEvent class represents event objects that are dispatched as part of a drag-and-drop
+ *  operation.
+ *
+ *  @see mx.managers.DragManager
+ *  @see mx.core.DragSource
+ *  @see mx.core.UIComponent
+ */
+public class DragEvent extends MouseEvent
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  The DragEvent.DRAG_COMPLETE constant defines the value of the
+	 *  type property of the event object for a dragComplete event.
+     *
+	 *
The properties of the event object have the following values:

+	 *

+	 *
Property	Value

+     *
action	The action that caused the event:
+     *       DragManager.COPY, DragManager.LINK,
+     *       DragManager.MOVE, or DragManager.NONE.

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
dragInitiator	The component that initiated the drag.

+     *
dragSource	The DragSource object containing the
+     *       data being dragged.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+	 *

+	 *
+     *  @eventType dragComplete
+	 */
+	public static const DRAG_COMPLETE:String = "dragComplete";
+
+	/**
+	 *  The DragEvent.DRAG_DROP constant defines the value of the
+	 *  type property of the event object for a dragDrop event.
+     *
+	 *
The properties of the event object have the following values:

+	 *

+	 *
Property	Value

+     *
action	The action that caused the event:
+     *       DragManager.COPY, DragManager.LINK,
+     *       DragManager.MOVE, or DragManager.NONE.

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
dragInitiator	The component that initiated the drag.

+     *
dragSource	The DragSource object containing the
+     *       data being dragged.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+	 *

+	 *
+     *  @eventType dragDrop
+	 */
+	public static const DRAG_DROP:String = "dragDrop";
+
+	/**
+	 *  The DragEvent.DRAG_ENTER constant defines the value of the
+	 *  type property of the event object for a dragEnter event.
+     *
+	 *
The properties of the event object have the following values:

+	 *

+	 *
Property	Value

+     *
action	The action that caused the event, which is always
+     *       DragManager.MOVE.

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
dragInitiator	The component that initiated the drag.

+     *
dragSource	The DragSource object containing the
+     *       data being dragged.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+	 *

+	 *
+     *  @eventType dragEnter
+	 */
+	public static const DRAG_ENTER:String = "dragEnter";
+
+	/**
+	 *  The DragEvent.DRAG_EXIT constant defines the value of the
+	 *  type property of the event object for a dragExit event.
+     *
+	 *
The properties of the event object have the following values:

+	 *

+	 *
Property	Value

+     *
action	The action that caused the event:
+     *       DragManager.COPY, DragManager.LINK,
+     *       DragManager.MOVE, or DragManager.NONE.

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
dragInitiator	The component that initiated the drag.

+     *
dragSource	The DragSource object containing the
+     *       data being dragged.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+	 *

+	 *
+     *  @eventType dragExit
+	 */
+	public static const DRAG_EXIT:String = "dragExit";
+
+	/**
+	 *  The DragEvent.DRAG_OVER constant defines the value of the
+	 *  type property of the event object for a dragOver event.
+     *
+	 *
The properties of the event object have the following values:

+	 *

+	 *
Property	Value

+     *
action	The action that caused the event:
+     *       DragManager.COPY, DragManager.LINK,
+     *       DragManager.MOVE, or DragManager.NONE.

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
dragInitiator	The component that initiated the drag.

+     *
dragSource	The DragSource object containing the
+     *       data being dragged.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+	 *

+	 *
+     *  @eventType dragOver
+	 */
+	public static const DRAG_OVER:String = "dragOver";
+
+	/**
+	 *  The DragEvent.DRAG_START constant defines the value of the
+	 *  type property of the event object for a dragStart event.
+     *
+	 *
The properties of the event object have the following values:

+	 *

+	 *
Property	Value

+     *
action	The action that caused the event:
+     *       DragManager.COPY, DragManager.LINK,
+     *       DragManager.MOVE, or DragManager.NONE.

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
dragInitiator	The component that initiated the drag.

+     *
dragSource	The DragSource object containing the
+     *       data being dragged.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+	 *

+	 *
+     *  @eventType dragStart
+	 */
+	public static const DRAG_START:String = "dragStart";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *  Normally called by the Flex control and not used in application code.
+	 *
+	 *  @param type The event type; indicates the action that caused the event.
+	 *
+	 *  @param bubbles Specifies whether the event can bubble up the display list hierarchy.
+	 *
+	 *  @param cancelable Specifies whether the behavior associated with the event can be prevented.
+	 *
+	 *  @param dragInitiator IUIComponent that specifies the component initiating
+	 *  the drag.
+	 *
+	 *  @param dragSource A DragSource object containing the data being dragged.
+	 *
+	 *  @param action The specified drop action, such as DragManager.MOVE.
+	 *
+	 *  @param ctrlKey Indicates whether the Ctrl key was pressed.
+	 *
+	 *  @param altKey Indicates whether the Alt key was pressed.
+	 *
+	 *  @param shiftKey Indicates whether the Shift key was pressed.
+	 */
+	public function DragEvent(type:String, bubbles:Boolean = false,
+							  cancelable:Boolean = true,
+							  dragInitiator:IUIComponent = null,
+							  dragSource:DragSource = null,
+							  action:String = null,
+							  ctrlKey:Boolean = false,
+							  altKey:Boolean = false,
+							  shiftKey:Boolean = false)
+	{
+		super(type, bubbles, cancelable);
+
+		this.dragInitiator = dragInitiator;
+		this.dragSource = dragSource;
+		this.action = action;
+		this.ctrlKey = ctrlKey;
+		this.altKey = altKey;
+		this.shiftKey = shiftKey;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  action
+	//----------------------------------
+
+	/**
+	 *  The requested action.
+	 *  One of DragManager.COPY, DragManager.LINK,
+	 *  DragManager.MOVE, or DragManager.NONE.
+	 */
+	public var action:String;
+
+	//----------------------------------
+	//  draggedItem
+	//----------------------------------
+
+	/**
+	 *  If the dragInitiator property contains
+	 *  an IAutomationObject object,
+	 *  this property contains the child IAutomationObject object near the mouse cursor.
+	 *  If the dragInitiator property does not contain
+	 *  an IAutomationObject object,  this proprty is null.
+	 */
+	public var draggedItem:Object;
+
+	//----------------------------------
+	//  dragInitiator
+	//----------------------------------
+
+	/**
+	 *  The component that initiated the drag.
+	 */
+	public var dragInitiator:IUIComponent;
+
+	//----------------------------------
+	//  dragSource
+	//----------------------------------
+
+	/**
+	 *  The DragSource object containing the data being dragged.
+	 */
+	public var dragSource:DragSource;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: Event
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+ 	 *  @private
+	 */
+	override public function clone():Event
+	{
+		var cloneEvent:DragEvent = new DragEvent(type, bubbles, cancelable,
+                                                 dragInitiator, dragSource,
+												 action, ctrlKey,
+												 altKey, shiftKey);
+
+		// Set relevant MouseEvent properties.
+		cloneEvent.relatedObject = this.relatedObject;
+		cloneEvent.localX = this.localX;
+		cloneEvent.localY = this.localY;
+
+		return cloneEvent;
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 10507
Author:   egeorgie@adobe.com
Date:     2009-09-22T18:49:47.519726Z

Log Message:
-----------
Fix for http://bugs.adobe.com/jira/browse/SDK-23369 Update Path Bounds Calculations to Account for Miter Limit and Stroke

QE notes: Add test for path bounds with thick stroke and miter limit.
Doc notes: None
Bugs: SDK-23369
Reviewer: Deepa
Tests run: checkintests, mustella (spark/primitives, layout, core/group, components/radiobutton, componennts/checkbox)
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/IStroke.as
+++ frameworks/projects/framework/src/mx/graphics/IStroke.as
@@ -52,6 +52,10 @@
 	 */
 	function set weight(value:Number):void;

+    //----------------------------------
+    //  scaleMode
+    //----------------------------------
+
     /**
      *  A value from the LineScaleMode class
      *  that  specifies which scale mode to use.
@@ -86,6 +90,39 @@
      *  @productversion Flex 3
      */
     function get scaleMode():String;
+
+    //----------------------------------
+    //  miterLimit
+    //----------------------------------
+
+    /**
+     *  Indicates the limit at which a miter is cut off.
+     *  Valid values range from 0 to 255.
+     *
+     *  @default 3
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get miterLimit():Number;
+
+    //----------------------------------
+    //  joints
+    //----------------------------------
+
+    /**
+     *  Specifies the type of joint appearance used at angles.
+     *  Valid values are JointStyle.ROUND, JointStyle.MITER,
+     *  and JointStyle.BEVEL.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get joints():String;

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


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

--- frameworks/projects/mx/src/mx/skins/halo/CheckBoxIcon.as
+++ frameworks/projects/mx/src/mx/skins/halo/CheckBoxIcon.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-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: 8481
Author:   smgilson@adobe.com
Date:     2009-07-09T17:28:31.741329Z

Log Message:
-----------
First of several checkins to update the namespace in ASDoc MXML syntax descriptions for Spark components

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

Modified Paths:
--------------
<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/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.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/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.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/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/VGroup.as
+++ frameworks/projects/spark/src/spark/components/VGroup.as
@@ -30,7 +30,7 @@
  *  attributes of its superclass and adds the following tag attributes:

  *
  *

- *  <VGroup
+ *  <s:VGroup
  *    Properties
  *    gap="6"
  *    horizontalAlign="left"


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

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


Fixed #4

Fixed #4

--- age/src/age/pad/AIPad.as
+++ age/src/age/pad/AIPad.as
@@ -2,7 +2,7 @@
 {

 	/**
-	 * AI 手柄，也就是和电脑对战时使用的手柄
+	 * AI 手柄
 	 * @author zhanghaocong
 	 *
 	 */


Funkcija objectAt vraca * umjesto ManagedObject.

--- src/Modi/ManagedArray.as
+++ src/Modi/ManagedArray.as
@@ -172,7 +172,7 @@
 			return _data.lastIndexOf(searchElement, fromIndex);
 		}

-		public function objectAt(index:int):ManagedObject
+		public function objectAt(index:int):*
 		{
 			if (index < 0 || index >= _data.length)
 			{


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

--- frameworks/projects/charts/src/mx/charts/effects/SeriesEffect.as
+++ frameworks/projects/charts/src/mx/charts/effects/SeriesEffect.as
@@ -0,0 +1,221 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.charts.effects
+{
+
+import mx.charts.effects.effectClasses.SeriesEffectInstance;
+import mx.effects.IEffectInstance;
+import mx.effects.TweenEffect;
+
+/**
+ *  The base class for chart effects.
+ *
+ *  @mxml
+ *
+ *
The <mx:SeriesEffect> tag
+ *  inherits the tag attributes of its superclass,
+ *  and adds the following tag attributes:

+ *
+ *

+ *  <mx:tagname
+ *    Properties
+ *    elementOffset="20"
+ *    minimumElementDuration="0"
+ *    offset="0"
+ *    type="show|hide (Default value is set by chart)"
+ *  >
+ *

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class SeriesEffect extends TweenEffect
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param target The target of the effect.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function SeriesEffect(target:Object)
+    {
+        super(target);
+
+        instanceClass = SeriesEffectInstance;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  elementOffset
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="20")]
+
+    /**
+     *  Specifies the amount of time, in milliseconds, that Flex delays
+     *  the start of the effect on each element in the series.
+     *
+     *
Set elementOffset to 0
+     *  to affect all elements of the series at the same time.
+     *  They start the effect at the same time and end it at the same time.

+     *
+     *
Set elementOffset to a positive integer
+     *  (such as 30) to stagger the effect on each element
+     *  by that amount of time.
+     *  For example, with a slide effect, the first element slides in
+     *  immediately, then the next element begins 30 milliseconds later,
+     *  and so on.
+     *  The amount of time for the effect to execute is the same
+     *  for each element, but the overall duration of the effect is longer.

+     *
+     *
Set elementOffset to a negative value
+     *  to have the effect begin from the last element
+     *  and move backwards through the list.

+     *
+     *
The default is 20.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var elementOffset:Number = 20;
+
+    //----------------------------------
+    //  minimumElementDuration
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="0")]
+
+    /**
+     *  Specifies the amount of time, in milliseconds,
+     *  that an individual element should take to complete the effect.
+     *
+     *
Charts with a variable number of data points in the series
+     *  cannot reliably create smooth effects
+     *  with only the duration property.
+     *  For example, an effect with a duration
+     *  of 1000 and an elementOffset
+     *  of 100 takes 900 milliseconds per element
+     *  to complete an effect if you have two elements in the series.
+     *  This is because the start of each effect is offset by 100
+     *  and each effect finishes in 1000 milliseconds.

+     *
+     *
If there are four elements in the series,
+     *  each element takes 700 milliseconds to complete
+     *  (the last effect starts 300 milliseconds after the first
+     *  and must be completed within 1000 milliseconds).
+     *  With 10 elements, each element has only 100 milliseconds

+     *  to complete the effect.
+     *
+     *
The minimumElementDuration value
+     *  sets a minimal duration for each element.
+     *  No element of the series takes less than this amount of time
+     *  (in milliseconds) to execute the effect,
+     *  regardless of the number of elements in the series
+     *  and the value of the duration property.
+     *  As a result, it is possible for an effect to take longer
+     *  than a specified duration
+     *  if at least two of the following three properties are specified:
+     *  duration, offset,
+     *  and minimumElementDuration.

+     *
+     *
The default is 0.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var minimumElementDuration:Number = 0;
+
+    //----------------------------------
+    //  offset
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="0")]
+
+    /**
+     *  Specifies the amount of time, in milliseconds,
+     *  that Flex delays the effect.
+     *
+     *
Use this property to stagger effects on multiple series.

+     *
+     *
The default is 0.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var offset:Number = 0;
+
+    //----------------------------------
+    //  type
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The type of transition this effect is being used for. Some series effects define different behavior based on whether they are being used during the show or hide portion of
+     *  a chart transition. The SeriesSlide effect, for example, slides elements from their position off screen when this property is set to hide, and on screen when this property is set to show. This property
+     *  is set by the chart, based on whether the effect as assigned to the ShowDataEffect or HideDataEffect style.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var type:String = "show";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function initInstance(instance:IEffectInstance):void
+    {
+        super.initInstance(instance);
+
+        var seriesEffectInstance:SeriesEffectInstance =
+            SeriesEffectInstance(instance);
+        seriesEffectInstance.offset = offset;
+        seriesEffectInstance.elementOffset = elementOffset;
+        seriesEffectInstance.minimumElementDuration = minimumElementDuration;
+        seriesEffectInstance.type = type;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6595
Author:   dsubrama@adobe.com
Date:     2009-05-04T20:00:36.061973Z

Log Message:
-----------
Support for caret state in ItemRenderers and List. Focus management puts renderers in the caret state and selectUponNavigation is partly implemented. This is the first step towards getting DropDownList selection/list keyboard navigation work working. Jason will do the integration/refactoring on the List end with a subsequent check-in.

QA: Hold off till Jason's refactoring work comes in
Checkintests: PASS
Mustella tests: List, ButtonBar - PASS

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/DefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/IItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/IndexChangedEvent.as</path>

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

--- frameworks/projects/framework/src/mx/events/IndexChangedEvent.as
+++ frameworks/projects/framework/src/mx/events/IndexChangedEvent.as
@@ -238,6 +238,45 @@
      *  @productversion Flex 3
      */
     public static const SELECTION_CHANGING:String = "selectionChanging";
+
+    /**
+     *  The IndexChangedEvent.ITEM_FOCUS_CHANGED constant defines the value of the
+     *  type property of the event object for a itemFocusChanging event,
+     *  which indicates that the current item in focus is about to change.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
inputType	Indicates whether this event
+     *         was caused by a mouse or keyboard interaction.

+     *
newIndex	The zero-based index of the
+     *       selected item after the change.

+     *
oldIndex	The zero-based index of the
+     *       selected item before the change.

+     *
relatedObject	null

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *
TriggerEvent	The event that
+     *        triggered this event.

+     *
Type	IndexChangedEvent.HEADER_SHIFT

+     *

+     *
+      *  @eventType itemFocusChanged
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public static const ITEM_FOCUS_CHANGED:String = "itemFocusChanged";

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


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

--- frameworks/projects/rpc/src/mx/messaging/messages/SOAPMessage.as
+++ frameworks/projects/rpc/src/mx/messaging/messages/SOAPMessage.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: 9932
Author:   smgilson@adobe.com
Date:     2009-09-02T19:17:26.077257Z

Log Message:
-----------
Add ASDoc version tags to new or untagged classes - Part 2

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/RectangularBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/Responder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/OverrideBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RichTextEditor.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/SparkChromeWindowedApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/WindowedApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLSchemaInstance.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as
+++ frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as
@@ -76,6 +76,11 @@
  * in order.
  *
  * @includeExample examples/RemoteObjectExample.mxml -noswf
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  *
  */
 public dynamic class RemoteObject extends mx.rpc.remoting.RemoteObject implements IMXMLSupport, IMXMLObject
@@ -91,6 +96,11 @@
      *
      *  @param destination The destination of the RemoteObject, should match a destination name
      * in the services-config.xml file.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function RemoteObject(destination:String = null)
     {
@@ -175,6 +185,11 @@
      * Operation instead.
      * @param name Name of the Operation.
      * @return Operation that executes for this name.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override public function getOperation(name:String):AbstractOperation
     {
@@ -196,6 +211,11 @@
      *
      * @param document the MXML document on which this RemoteObject lives
      * @param id the id of this RemoteObject within the document
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function initialized(document:Object, id:String):void
     {


Prevented possible null errors from errorType and errorCode in XMPPStanza.

--- src/org/igniterealtime/xiff/data/XMPPStanza.as
+++ src/org/igniterealtime/xiff/data/XMPPStanza.as
@@ -359,7 +359,7 @@
 		 */
 		public function get errorType():String
 		{
-			return myErrorNode.attributes.type;
+			return myErrorNode && myErrorNode.attributes ? myErrorNode.attributes.type : null;
 		}

 		public function set errorType( value:String ):void
@@ -382,7 +382,7 @@
 		 */
 		public function get errorCode():int
 		{
-			return parseInt( myErrorNode.attributes.code );
+			return myErrorNode && myErrorNode.attributes ? parseInt( myErrorNode.attributes.code ) : 0;
 		}

 		public function set errorCode( value:int ):void


Bind also HLS error within HLSMediaElement (see OSMF LightweightvideoElement class)

--- src/org/mangui/osmf/plugins/HLSMediaElement.as
+++ src/org/mangui/osmf/plugins/HLSMediaElement.as
@@ -3,8 +3,10 @@
     import flash.net.NetStream;

     import org.mangui.hls.HLS;
+    import org.mangui.hls.HLSEvent;
     import org.mangui.osmf.plugins.loader.HLSNetLoader;
     import org.mangui.osmf.plugins.traits.*;
+    import org.mangui.osmf.plugins.utils.ErrorManager;

     import org.osmf.media.LoadableElementBase;
     import org.osmf.media.MediaElement;
@@ -23,6 +25,8 @@
     import org.osmf.traits.SeekTrait;
     import org.osmf.traits.TimeTrait;
     import org.osmf.utils.OSMFSettings;
+    import org.osmf.events.MediaError;
+    import org.osmf.events.MediaErrorEvent;

     CONFIG::LOGGING {
     import org.mangui.hls.utils.Log;
@@ -39,6 +43,7 @@
             _hls = hls;
             _defaultduration = duration;
             super(resource, new HLSNetLoader(hls));
+            _hls.addEventListener(HLSEvent.ERROR, _errorHandler);
         }

         protected function createVideo() : Video {
@@ -156,5 +161,14 @@
             var alternateAudioTrait : HLSAlternativeAudioTrait = new HLSAlternativeAudioTrait(_hls, this as MediaElement);
             addTrait(MediaTraitType.ALTERNATIVE_AUDIO, alternateAudioTrait);
         }
+
+        private function _errorHandler(event : HLSEvent) : void {
+            var errorCode : int = ErrorManager.getMediaErrorCode(event);
+            var errorMsg : String = ErrorManager.getMediaErrorMessage(event);
+            CONFIG::LOGGING {
+            Log.warn("HLS Error event received, dispatching MediaError " + errorCode + "," + errorMsg);
+            }
+            dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(errorCode, errorMsg)));
+        }
     }
 }