Transferred from the Adobe Open Source Subversion Repository

Revision: 14930
Author:   cframpto@adobe.com
Date:     2010-03-23T01:03:37.287301Z

Log Message:
-----------
Merge mirroring changes 14914 and RichEditableText scroller change 14929 from 4.x to trunk.

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

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -9699,9 +9699,9 @@

             focusObj.setActualSize(width + 2 * thickness,
                                    height + 2 * thickness);
-
+
             var pt:Point;
-
+
             if (rotation)
             {
                 var rotRad:Number = rotation * Math.PI / 180;
@@ -9714,14 +9714,31 @@
                 pt = new Point(obj.x - thickness, obj.y - thickness);
                 DisplayObject(focusObj).rotation = 0;
             }
-
+
             if (obj.parent == this)
             {
                 // This adjustment only works if obj is a direct child of this.
                 pt.x += x;
                 pt.y += y;
             }
-            pt = parent.localToGlobal(pt);
+
+            // If necessary, compenstate for mirroring, if the obj to receive
+            // focus isn't this component.  It is likely to be an icon within
+            // the component such as a radio button or check box.  This works
+            // as long as the focusObj is symmetric.
+            // ToDo(cframpto):ProgrammaticSkin implement ILayoutDirectionElement.
+            if (obj != this)
+            {
+                // The focusObj is attached to this component's parent.  Assume
+                // the focusObj is a class which doesn't support layoutDirection
+                // and will be laid out like the component's parent.  If the
+                // component is being mirrored it means its layout differs from
+                // its parent and we need to compenstate.
+                if (_layoutFeatures && _layoutFeatures.mirror)
+                    pt.x += this.width - obj.width;
+            }
+
+            pt = parent.localToGlobal(pt);
             pt = parent.globalToLocal(pt);
             focusObj.move(pt.x, pt.y);


Transferred from the Adobe Open Source Subversion Repository

Revision: 10464
Author:   rfrishbe@adobe.com
Date:     2009-09-21T17:40:30.663638Z

Log Message:
-----------
Removing support in Flex framework for compatibility version < 3.  We won't support compatibility-version 2 or 2.01 anymore.  We only keep compatibility-version for one full release, so for Flex 4, we only support compatibility-version = 3.x.

This should reduce our code-size some as we no longer need this old code.  I didn't clean up the compiler's support for compatibility-versioning as it didn't seem worth the effort.

QE notes: -
Doc notes: -
Bugs: SDK-15360
Reviewer: Kevin
Tests run: checkintests, Joan ran all mustella tests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserYearArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuBarItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PanelSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/Flex.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -5881,9 +5881,6 @@
      */
     public function get baselinePosition():Number
     {
-        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-            return NaN;
-
         if (!validateBaselinePosition())
             return NaN;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19968
Author:   klin@adobe.com
Date:     2011-01-26T23:36:39.306445Z

Log Message:
-----------
Adding tolerance values for minimum and maximum sizes in fitBounds(). This prevents us from throwing out possible solutions when comparing against the provided boundaries. The tolerance values are exposed as mx_internal for tooling to experiment with.

QE notes: No
Doc notes: No
Bugs: SDK-29232, SDK-29237
Reviewer: Evtim
Tests run: cyclone server, checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/MatrixUtil.as

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

--- frameworks/projects/framework/src/mx/utils/MatrixUtil.as
+++ frameworks/projects/framework/src/mx/utils/MatrixUtil.as
@@ -23,6 +23,10 @@
 import flash.system.ApplicationDomain;
 import flash.utils.getDefinitionByName;

+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
 [ExcludeClass]

 /**
@@ -35,6 +39,8 @@
     include "../core/Version.as";

 	private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
+    mx_internal static var SOLUTION_TOLERANCE:Number = 0.1;
+    mx_internal static var MIN_MAX_TOLERANCE:Number = 0.1;

 	private static var staticPoint:Point = new Point();

@@ -73,7 +79,7 @@
 	}

 	/**
-	 *  Retunrns a static Point object with the result.
+	 *  Returns a static Point object with the result.
 	 *  If matrix is null, point is untransformed.
 	 */
 	public static function transformPoint(x:Number, y:Number, m:Matrix):Point
@@ -584,14 +590,19 @@
         if (isNaN(width) && isNaN(height))
             return new Point(preferredWidth, preferredHeight);

-        const tolerance:Number = .01;
+        // Allow for precision errors by including tolerance for certain values.
+        const newMinWidth:Number = (minWidth < MIN_MAX_TOLERANCE) ? 0 : minWidth - MIN_MAX_TOLERANCE;
+        const newMinHeight:Number = (minHeight < MIN_MAX_TOLERANCE) ? 0 : minHeight - MIN_MAX_TOLERANCE;
+        const newMaxWidth:Number = maxWidth + MIN_MAX_TOLERANCE;
+        const newMaxHeight:Number = maxHeight + MIN_MAX_TOLERANCE;
+
         var actualSize:Point;

         if (!isNaN(width) && !isNaN(height))
         {
             actualSize = calcUBoundsToFitTBounds(width, height, matrix,
-                                                 minWidth, minHeight,
-                                                 maxWidth, maxHeight);
+                                                 newMinWidth, newMinHeight,
+                                                 newMaxWidth, newMaxHeight);

             // If we couldn't fit in both dimensions, try to fit only one and
             // don't stick out of the other
@@ -601,14 +612,14 @@
                 actualSize1 = fitTBoundsWidth(width, matrix,
                                               explicitWidth, explicitHeight,
                                               preferredWidth, preferredHeight,
-                                              minWidth, minHeight,
-                                              maxWidth, maxHeight);
+                                              newMinWidth, newMinHeight,
+                                              newMaxWidth, newMaxHeight);

                 // If we fit the width, but not the height.
                 if (actualSize1)
                 {
                     var fitHeight:Number = transformSize(actualSize1.x, actualSize1.y, matrix).y;
-                    if (fitHeight - tolerance > height)
+                    if (fitHeight - SOLUTION_TOLERANCE > height)
                         actualSize1 = null;
                 }

@@ -616,14 +627,14 @@
                 actualSize2 = fitTBoundsHeight(height, matrix,
                                                explicitWidth, explicitHeight,
                                                preferredWidth, preferredHeight,
-                                               minWidth, minHeight,
-                                               maxWidth, maxHeight);
+                                               newMinWidth, newMinHeight,
+                                               newMaxWidth, newMaxHeight);

                 // If we fit the height, but not the width
                 if (actualSize2)
                 {
                     var fitWidth:Number = transformSize(actualSize2.x, actualSize2.y, matrix).x;
-                    if (fitWidth - tolerance > width)
+                    if (fitWidth - SOLUTION_TOLERANCE > width)
                         actualSize2 = null;
                 }

@@ -648,16 +659,16 @@
             return fitTBoundsWidth(width, matrix,
                                    explicitWidth, explicitHeight,
                                    preferredWidth, preferredHeight,
-                                   minWidth, minHeight,
-                                   maxWidth, maxHeight);
+                                   newMinWidth, newMinHeight,
+                                   newMaxWidth, newMaxHeight);
         }
         else
         {
             return fitTBoundsHeight(height, matrix,
                                     explicitWidth, explicitHeight,
                                     preferredWidth, preferredHeight,
-                                    minWidth, minHeight,
-                                    maxWidth, maxHeight);
+                                    newMinWidth, newMinHeight,
+                                    newMaxWidth, newMaxHeight);
         }
     }


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

--- frameworks/projects/rpc/src/mx/rpc/events/HeaderEvent.as
+++ frameworks/projects/rpc/src/mx/rpc/events/HeaderEvent.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.rpc.events
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 20149
Author:   klin@adobe.com
Date:     2011-02-04T21:39:31.000080Z

Log Message:
-----------
Add and update [Inspectable] metadata across spark components.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TileGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/modules/ModuleLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/mediaClasses/DynamicStreamingVideoItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/Button.as
+++ frameworks/projects/spark/src/spark/components/Button.as
@@ -206,6 +206,8 @@
     //
     //--------------------------------------------------------------------------

+    [Inspectable(category="General")]
+
     /**
      *  @private
      */


Transferred from the Adobe Open Source Subversion Repository

Revision: 4032
Author:   hmuller@adobe.com
Date:     2008-11-06T21:47:20.290379Z

Log Message:
-----------
Performance tweaks for GroupBase, VGroup, and HGroup.

GroupBase workaround for a FP bug
(http://frpbugapp.macromedia.com/bugapp/detail.asp?ID=239120).  Ignore
attempts to reset the DisplayObject scrollRect property to null (its
default value) if we've never set it.  Similarly, don't read the
DisplayObject scrollRect property if its value has not been set.

Changed event redisptaching in VGroup, HGroup: only add listeners
to the underlying layout, if a corresponding listener is added
to the V,HGroup.

QE Notes: Additional tests for HGroup, VGroup will be needed
Doc Notes: None
Bugs:
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/HGroup.as
+++ frameworks/projects/spark/src/spark/components/HGroup.as
@@ -43,10 +43,7 @@
     public function HGroup():void
     {
         super();
-        var hl:HorizontalLayout = new HorizontalLayout();
-        hl.addEventListener("indexInViewChanged", redispatchHandler);
-        hl.addEventListener("propertyChange", redispatchHandler);
-        layout = hl;
+        layout = new HorizontalLayout();
     }

     private function get horizontalLayout():HorizontalLayout
@@ -191,6 +188,38 @@
     //  Event Handlers
     //
     //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     */
+    override public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
+    {
+        switch(type)
+        {
+            case "indexInViewChanged":
+            case "propertyChange":
+                if (!hasEventListener(type))
+                    horizontalLayout.addEventListener(type, redispatchHandler);
+                break;
+        }
+        super.addEventListener(type, listener, useCapture, priority, useWeakReference)
+    }
+
+    /**
+     * @private
+     */
+    override public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
+    {
+        super.removeEventListener(type, listener, useCapture);
+        switch(type)
+        {
+            case "indexInViewChanged":
+            case "propertyChange":
+                if (!hasEventListener(type))
+                    horizontalLayout.removeEventListener(type, redispatchHandler);
+                break;
+        }
+    }

     private function redispatchHandler(event:Event):void
     {


Added unique tests for the Disjunctive Syllogism, demonstrating the different behavior depending on the presence or absence of an inference.

--- unittests/TestDisjunctiveSyllogism.as
+++ unittests/TestDisjunctiveSyllogism.as
@@ -4,13 +4,13 @@
 	{
 		import logic.DisjunctiveSyllogism;
 		import org.flexunit.Assert;
-
+		import mx.controls.Alert;
 		private var djs:DisjunctiveSyllogism;

 		[Before]
 		public function setUp():void
 		{
-			djs = new DisjunctiveSyllogism("Basic Claim", ["Reason 1", "Reason 2"], false, "Foo or Bar and Baz", false);
+			djs = new DisjunctiveSyllogism("Basic Claim", ["Reason 1", "Reason 2"], false, "Either Foo or Bar, and Baz", false);
 		}

 		[After]
@@ -36,11 +36,16 @@
 		public function testConstructorReason():void{
 			Assert.assertEquals("Reason 1", djs.getReason()[0]);
 		}
+		//New tests for this subclass's particular functions
 		[Test]
-		public function testNotP():void{
-			//djs.notP(true);
-			//Right now this isn't working
-			trace(djs.getReason()[0]);
+		public function testNotPTrue():void{
+			djs.notP(true);
+			Assert.assertEquals("It is not the case that Foo", djs.getReason()[0]);
+		}
+		[Test]
+		public function testNotPFalse():void{
+			djs.notP(false);
+			Assert.assertEquals("It is not the case that Reason 1", djs.getReason()[0]);
 		}

 	}


420 Added support for setting a TextFormat at once in TextFieldBuilder. Only non-null properties are used. Also fixed/disambiguated some other setters

--- raw/src/org/yellcorp/lib/text/TextFieldBuilder.as
+++ raw/src/org/yellcorp/lib/text/TextFieldBuilder.as
@@ -40,19 +40,19 @@

     // FORMAT
     private var _align:String = TextFormatAlign.LEFT;
-    private var _blockIndent:Object;
+    private var _blockIndent:Number = 0;
     private var _bold:Boolean;
     private var _bullet:Boolean;
     private var _color:uint = 0x000000;
     private var _font:String = "_sans";
-    private var _indent:int = 0;
+    private var _indent:Number = 0;
     private var _italic:Boolean;
     private var _kerning:Boolean;
     private var _leading:Number = 0;
-    private var _leftMargin:int = 0;
-    private var _rightMargin:int = 0;
+    private var _leftMargin:Number = 0;
+    private var _rightMargin:Number = 0;
     private var _letterSpacing:Number = 0;
-    private var _size:Number = 12;
+    private var _fontSize:Number = 12;
     private var _tabStops:Array = null;

     // FIELD
@@ -205,7 +205,7 @@
     }

-    public function size(newWidth:Number, newHeight:Number):TextFieldBuilder
+    public function dimensions(newWidth:Number, newHeight:Number):TextFieldBuilder
     {
         _width = newWidth;
         _height = newHeight;
@@ -214,6 +214,26 @@

     // FORMAT
+    public function textFormat(format:TextFormat):TextFieldBuilder
+    {
+        if (format.align !== null) _align = format.align;
+        if (format.blockIndent !== null) _blockIndent = Number(format.blockIndent);
+        if (format.bold !== null) _bold = Boolean(format.bold);
+        if (format.bullet !== null) _bullet = Boolean(format.bullet);
+        if (format.color !== null) _color = uint(format.color);
+        if (format.font !== null) _font = format.font;
+        if (format.indent !== null) _indent = Number(format.indent);
+        if (format.italic !== null) _italic = Boolean(format.italic);
+        if (format.kerning !== null) _kerning = Boolean(format.kerning);
+        if (format.leading !== null) _leading = Number(format.leading);
+        if (format.leftMargin !== null) _leftMargin = Number(format.leftMargin);
+        if (format.rightMargin !== null) _rightMargin = Number(format.rightMargin);
+        if (format.letterSpacing !== null) _letterSpacing = Number(format.letterSpacing);
+        if (format.size !== null) _fontSize = Number(format.size);
+        if (format.tabStops !== null) _tabStops = format.tabStops;
+        return this;
+    }
+
     public function align(newAlign:String):TextFieldBuilder
     {
         _align = newAlign;
@@ -221,7 +241,7 @@
     }

-    public function blockIndent(newBlockIndent:Object):TextFieldBuilder
+    public function blockIndent(newBlockIndent:Number):TextFieldBuilder
     {
         _blockIndent = newBlockIndent;
         return this;
@@ -256,7 +276,14 @@
     }

-    public function indent(newIndent:int):TextFieldBuilder
+    public function fontSize(newFontSize:Number):TextFieldBuilder
+    {
+        _fontSize = newFontSize;
+        return this;
+    }
+
+
+    public function indent(newIndent:Number):TextFieldBuilder
     {
         _indent = newIndent;
         return this;
@@ -284,14 +311,14 @@
     }

-    public function leftMargin(newLeftMargin:int):TextFieldBuilder
+    public function leftMargin(newLeftMargin:Number):TextFieldBuilder
     {
         _leftMargin = newLeftMargin;
         return this;
     }

-    public function rightMargin(newRightMargin:int):TextFieldBuilder
+    public function rightMargin(newRightMargin:Number):TextFieldBuilder
     {
         _rightMargin = newRightMargin;
         return this;
@@ -435,7 +462,7 @@

     private function createTextFormat():TextFormat
     {
-        var tf:TextFormat = new TextFormat(_font, _size, _color, _bold,
+        var tf:TextFormat = new TextFormat(_font, _fontSize, _color, _bold,
                 _italic, false, null, null, _align, _leftMargin,
                 _rightMargin, _indent, _leading);


Move the default loading progress printout to the middle of the iso view.

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

--- src/as/com/threerings/miso/client/MisoScenePanel.as
+++ src/as/com/threerings/miso/client/MisoScenePanel.as
@@ -148,6 +148,9 @@

         _loadingProgressFunc = function (progress :Number) :void {
             loadingText.text = "Loading... " + int(progress*100) + "%";
+            loadingText.x = (_isoView.size.x - loadingText.width)/2;
+            loadingText.y = (_isoView.size.y - loadingText.height)/2;
+
         };
         _loadingProgressFunc(0.0);
         return loadingText;


More checks in interfaceCast test

More checks in interfaceCast test

--- src/avm2/tests/regress/correctness/interfaceCast.as
+++ src/avm2/tests/regress/correctness/interfaceCast.as
@@ -1,6 +1,11 @@
 package {

   interface IClassA
+  {
+    function foo() : void;
+  }
+
+  interface IClassB
   {
     function foo() : void;
   }
@@ -21,5 +26,17 @@
   trace("-- IClassA");
   var ai: IClassA = a;
   ai.foo();
+  trace("-- as IClassA");
+  (a as IClassA).foo();
+
+  trace("-- IClassB()");
+  var thrown;
+  try {
+    IClassB(a).foo();
+    trace('FAIL');
+  } catch (e: Error) { trace('OK'); }
+  trace("-- as IClassB");
+  var isNull = (a as IClassB) === null;
+  trace(isNull);
   trace("--");
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 2863
Author:   dloverin@adobe.com
Date:     2008-08-16T03:28:51.231298Z

Log Message:
-----------
Changes recommend from API review.

QE: YES
Doc: YES
Checkintests: YES
Reviewer:
Bugs:

Move APIs from IFocusManager2 into IFocusManager and remove IFocusManager2.
Rename SandboxUtil -> SecurityUtil
* mx.utils.SecurityUtil
Remove hasMutualTrustWithParent()
Remove hasMutualTrustWithChild()
Add hasMutualTrustBetweenParentAndChild()

Rename SWFLoader.compatibleLoad -> SWFLoader.loadForCompatibility
Create mx.managers.FocusDirection
Rename SystemManager.dispatchEventToSandboxes -> SystemManager.dispatchEventFromSWFBridges

* mx.managers.IFocusManager

addFocusManagerBridge() -> addSWFBridge
removeFocusManagerBridge() -> removeSWFBridge

* mx.managers.SystemManagerProxy
activateProxy() -> activateByProxy()
deactivateProxy() -> deactivateByProxy()

* mx.managers.ISystemManager
useBridge() -> useSWFBridge()

Move/Rename mx.sandbox.ISandboxBridgeProvider -> mx.core.ISWFBridgeProvider
Move/Rename mx.sandbox.ISandboxBridgeGroup -> mx.core.ISWFBridgeGroup
Move/Rename mx.sandbox.SandboxBridgeGroup -> mx.core.SWFBridgeGroup

Delete ISandboxGroupAccess, IParentAccess, IChildAccess

Rename many methods in mx.core.ISWFBridgeGroup
Rename mx.core.IAppliationLoader -> mx.core.ISWFLoader

* mx.core.ISWFBridgeProvider
Rename sandboxBridge -> swfBridge
add parentAllowsChild property
add childAllowsParent property

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/utils/SandboxUtil.as" copyfrom-rev="2851" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/utils/SecurityUtil.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/FocusDirection.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/utils/EventUtil.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/SandboxBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/IFocusManager.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/SWFBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/IFocusManagerContainer.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/IContainer.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/IApplicationLoader.as" copyfrom-rev="2851" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/ISWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/ISWFBridgeGroup.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/core/IApplicationLoader.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/FocusRequest.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/utils/SandboxUtil.as</path>
<path kind="dir" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/sandbox</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/IFocusManager2.as</path>

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

--- frameworks/projects/framework/src/mx/utils/SecurityUtil.as
+++ frameworks/projects/framework/src/mx/utils/SecurityUtil.as
@@ -14,13 +14,12 @@

 import flash.events.IEventDispatcher;

-import mx.sandbox.ISandboxBridgeGroup;
-import mx.managers.ISystemManager;
+import mx.core.ISWFBridgeProvider;

 /**
- *  Utilities for working with sandboxes.
+ *  Utilities for working with security issues.
  */
-public class SandboxUtil
+public class SecurityUtil
 {
 	include "../core/Version.as";

@@ -33,37 +32,11 @@
 	/**
 	 *  Tests if there is mutual trust between a SystemManager and its parent.
 	 */
-	public static function hasMutualTrustWithParent(sm:ISystemManager):Boolean
+	public static function hasMutualTrustBetweenParentAndChild(bp:ISWFBridgeProvider):Boolean
 	{
-		var sandboxBridgeGroup:ISandboxBridgeGroup = sm.sandboxBridgeGroup;
-
-		if (sandboxBridgeGroup.parentBridge &&
-			sandboxBridgeGroup.canAccessParentBridge() &&
-		    sandboxBridgeGroup.accessibleFromParentBridge())
-        {
-			return true;
-        }
-
-		return false;
-	}
-
-
-	/**
-	 *  Tests if there is mutual trust between a SystemManager
-     *  and one of its bridged applications.
-	 */
-	public static function hasMutualTrustWithChild(
-                                sm:ISystemManager,
-                                bridge:IEventDispatcher):Boolean
-	{
-		var sandboxBridgeGroup:ISandboxBridgeGroup = sm.sandboxBridgeGroup;
-
-		if (sandboxBridgeGroup.canAccessChildBridge(bridge) &&
-		    sandboxBridgeGroup.accessibleFromChildBridge(bridge))
-        {
-			return true;
-        }
-
+        if (bp && bp.childAllowsParent && bp.parentAllowsChild)
+            return true;
+
 		return false;
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 11048
Author:   smgilson@adobe.com
Date:     2009-10-21T15:58:50.556100Z

Log Message:
-----------
ASDoc update to ComboBox.as

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

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

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

--- frameworks/projects/spark/src/spark/components/ComboBox.as
+++ frameworks/projects/spark/src/spark/components/ComboBox.as
@@ -155,7 +155,8 @@
  *

  *

  *           Default skin class
- *           spark.skins.spark.ComboBoxSkin
+ *           spark.skins.spark.ComboBoxSkin
+
spark.skins.spark.ComboBoxTextInputSkin

  *

  *

  *
@@ -180,6 +181,7 @@
  *

  *
  *  @see spark.skins.spark.ComboBoxSkin
+ *  @see spark.skins.spark.ComboBoxTextInputSkin
  *
  *  @langversion 3.0
  *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 18109
Author:   dloverin@adobe.com
Date:     2010-10-08T21:29:52.633486Z

Log Message:
-----------
Another round of item editor changes, ASDoc updates, and bug fixes.

QE notes: Not ready for testing.
Doc notes: None.
Bugs:
Reviewer: Hans
Tests run: checkintests
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridItemEditor.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/DataGridEditEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/DataGridEditEvent.as" copyfrom-rev="18071" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/GridItemEditorEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/TextGridItemEditor.mxml</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/gridClasses/GridItemEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/ComboBoxGridItemEditor.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -14,6 +14,7 @@
 import flash.display.DisplayObject;
 import flash.events.Event;
 import flash.events.EventPhase;
+import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
 import flash.geom.Point;
 import flash.geom.Rectangle;
@@ -267,6 +268,74 @@
 [Event(name="caretChange", type="spark.events.GridCaretEvent")]

 //--------------------------------------
+//  Edit Events
+//--------------------------------------
+
+/**
+ *  Dispatched when a new item editor session has been requested. A listener can
+ *  dynamically determine if a cell is editable and cancel the edit (with
+ *  preventDefault()) if it is not. A listener may also dynamically
+ *  change the editor that will be used by assigning a different item editor to
+ *  a column.
+ *
+ *
If this event is cancelled the item editor will not be created.

+ *
+ *  @eventType spark.events.DataGridEditEvent.START_GRID_ITEM_EDITOR_SESSION
+ *
+ *  @see spark.components.DataGrid.itemEditorInstance
+ *  @see flash.events.Event
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="startGridItemEditorSession", type="spark.events.DataGridEditEvent")]
+
+/**
+ *  Dispatched immediately after an item editor has been opened.
+ *
+ *  @eventType spark.events.DataGridEditEvent.OPEN_GRID_ITEM_EDITOR_SESSION
+ *
+ *  @see spark.components.DataGrid.itemEditorInstance
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="openGridItemEditorSession", type="spark.events.DataGridEditEvent")]
+
+/**
+ *  Dispatched after the data in item editor has been saved into the data provider
+ *  and the editor has been closed.
+ *
+ *  @eventType spark.events.DataGridEditEvent.SAVE_GRID_ITEM_EDITOR_SESSION
+ *
+ *  @see spark.components.DataGrid.itemEditorInstance
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="saveGridItemEditorSession", type="spark.events.DataGridEditEvent")]
+
+/**
+ *  Dispatched after the item editor has been closed without saving its data.
+ *
+ *  @eventType spark.events.DataGridEditEvent.CANCEL_GRID_ITEM_EDITOR_SESSION
+ *
+ *  @see spark.components.DataGrid.itemEditorInstance
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="cancelGridItemEditorSession", type="spark.events.DataGridEditEvent")]
+
+//--------------------------------------
 //  Other metadata
 //--------------------------------------

@@ -406,13 +475,11 @@
     //----------------------------------
     //  editorLayer
     //----------------------------------
-
+    [Bindable]
     [SkinPart(required="false", type="mx.core.IVisualElementContainer")]

     /**
-     *  @private
-     *
-     *  Where item editors are added to the data grid.
+     *  The container for the itemEditor visual element.
      */
     public var itemEditorLayer:IVisualElementContainer;

@@ -1869,7 +1936,10 @@

             // Data grid editor
             if (editor)
+            {
                 editor.uninitialize();
+                editor = null;
+            }
         }

         if (grid)
@@ -2846,6 +2916,12 @@
      *
      *  @return true if the editor session was started. Returns false if
      *  the editor session was cancelled.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     *
      */
     public function startItemEditorSession(rowIndex:int, columnIndex:int):Boolean
     {
@@ -2856,20 +2932,20 @@
     }

     /**
-     *  Starts an editor session on a selected cell in the data grid.
-     *
-     *  A startItemEditorSession event is dispatch before
-     *  an item editor is created. This allows a listener a change to
-     *  dynamically set an item editor for a specified cell.
-     *
-     *  The event can be cancelled which will prevent the editor session
-     *  from being created.
-     *
-     *  @param rowIndex The zero-based row index of the cell to edit.
-     *  @param columnIndex The zero-based column index of the cell to edit.
-     *
+     *  Closes the currently active editor and optionally saves the editor's value
+     *  by calling the item editor's save() method.  If the cancel parameter is true,
+     *  then the editor's cancel() method is called instead.
+     *
+     *  @param cancel If false the data in the editor is saved.
+     *  Otherwise the data in the editor is discarded.
+     *
      *  @return true if the editor session was saved, false if the save was
      *  cancelled.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function endItemEditorSession(cancel:Boolean = false):Boolean
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18853
Author:   smgilson@adobe.com
Date:     2010-11-30T14:45:34.796685Z

Log Message:
-----------
ASDoc updates for DataGrid, part II

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

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

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -460,10 +460,35 @@
 [IconFile("DataGrid.png")]

 /**
- *  The DataGrid class
+ *  The DataGrid displays a row of column headings above a scrollable grid.
+ *  The gird is arranged as a collection of individual cells arranged
+ *  in rows and columns.
+ *  The DataGrid control is designed to support smooth scrolling through
+ *  large numbers of rows and columns.
+ *
+ *
The Spark DataGrid control is implemented as a skinnable wrapper
+ *  around the Spark Grid control.
+ *  The Grid control defines the columns of the data grid, and much of
+ *  the functionality of the DataGrid control itself.

+ *
+ *
The DataGrid skin is responsible for laying out the grid, column header, and scroller.
+ *  The skin also configures the graphic elements used to render visual elements
+ *  used as indicators, separators, and backgrounds.
+ *  The DataGrid skin also defines a default item renderer,
+ *  used to display the contents of each cell.

+ *
+ *  @mxml
The <s:DataGrid> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <s:DataGrid
+ *    Properties
+ *  />
+ *

  *
  *  @see Grid
  *  @see spark.components.gridClasses.GridColumn
+ *  @see spark.skins.spark.DataGridSkin
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -551,7 +576,12 @@
     [SkinPart(required="false", type="mx.core.IFactory")]

     /**
-     *  The IVisualElement class used to render the alternatingRowColors style
+     *  The IVisualElement class used to render the alternatingRowColors style.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var alternatingRowColorsBackground:IFactory;

@@ -564,6 +594,11 @@

     /**
      *  The IVisualElement class used to render the grid's caret indicator.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var caretIndicator:IFactory;

@@ -575,7 +610,12 @@
     [SkinPart(required="false", type="spark.components.GridColumnHeaderGroup")]

     /**
-     *  A reference to the GridColumnHeaderGroup that displays the column headers.
+     *  A reference to the GridColumnHeaderGroup object that displays the column headers.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var columnHeaderGroup:GridColumnHeaderGroup;

@@ -588,6 +628,11 @@

     /**
      *  The IVisualElement class used to render the vertical separator between columns.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var columnSeparator:IFactory;

@@ -600,9 +645,15 @@

     /**
      *  The IVisualElement class used to render a background behind
-     *  item renderers that are being edited. Item renderers may only be edited
+     *  item renderers that are being edited.
+     *  Item renderers may only be edited
      *  when the data grid and the column are both editable and the
-     *  column sets rendererIsEditable to true.
+     *  column sets rendererIsEditable to true.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var editorIndicator:IFactory;

@@ -614,7 +665,12 @@
     [SkinPart(required="false", type="spark.components.Grid")]

     /**
-     *  A reference to the Grid that displays the dataProvider.
+     *  A reference to the Grid control that displays row and columns.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var grid:spark.components.Grid;

@@ -627,6 +683,11 @@

     /**
      *  The IVisualElement class used to provide hover feedback.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var hoverIndicator:IFactory;

@@ -639,6 +700,11 @@

     /**
      *  The IVisualElement class used to render the background of each row.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var rowBackground:IFactory;

@@ -651,6 +717,11 @@

     /**
      *  The IVisualElement class used to render the horizontal separator between header rows.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var rowSeparator:IFactory;

@@ -662,7 +733,13 @@
     [SkinPart(required="false", type="spark.components.Scroller")]

     /**
-     *  A reference to the Scroller that scrolls the grid.
+     *  A reference to the Scroller control in the skin class
+     *  that adds scroll bars to the DataGrid control.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var scroller:Scroller;

@@ -675,6 +752,11 @@

     /**
      *  The IVisualElement class used to render selected rows or cells.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public var selectionIndicator:IFactory;

@@ -922,6 +1004,11 @@
      *  @copy spark.components.Grid#columns
      *
      *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get columns():IList
     {
@@ -977,7 +1064,12 @@
     /**
      *  @copy spark.components.Grid#dataProvider
      *
-     *  @default nulll
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get dataProvider():IList
     {
@@ -1010,6 +1102,8 @@

     /**
      *  @copy spark.components.Grid#dataTipField
+     *
+     *  @default null
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1039,6 +1133,8 @@
     /**
      *  @copy spark.components.Grid#dataTipFunction
      *
+     *  @default null
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
@@ -1071,12 +1167,13 @@
     [Inspectable(category="General")]

     /**
-     * The default value for the GridColumn editable property, which
-     * indicates if a corresponding cell's dataProvider item can be edited.
-     * If true, clicking on a selected cell opens an item editor, see
-     * startItemEditorSession.  Developers can enable/disable
-     * editing on a per cell (rather than per column) basis by handling
-     * the startItemEditorSession event.
+     *  The default value for the GridColumn editable property, which
+     *  indicates if a corresponding cell's data provider item can be edited.
+     *  If true, clicking on a selected cell opens an item editor.
+     *  You can enable or disable editing per cell (rather than per column)
+     *  by handling the startItemEditorSession event.
+     *  In the event handler, add the necessary logic to determine
+     *  if the cell should be editable.
      *
      *  @default false
      *
@@ -1103,8 +1200,8 @@
     //----------------------------------

     /**
-     *  The zero-based column index of the cell that is being edited. The
-     *  value is -1 if no cell is being edited.
+     *  The zero-based column index of the cell that is being edited.
+     *  The value is -1 if no cell is being edited.
      *
      *  @default -1
      *
@@ -1126,8 +1223,8 @@
     //----------------------------------

     /**
-     *  The zero-based row index of the cell that is being edited. The
-     *  value is -1 if no cell is being edited.
+     *  The zero-based row index of the cell that is being edited.
+     *  The value is -1 if no cell is being edited.
      *
      *  @default -1
      *
@@ -1152,7 +1249,7 @@
      *  A flag that indicates whether the IME should
      *  be enabled when the component receives focus.
      *
-     *  If the editor is up, it will set enableIME
+     *  If the editor is up, it sets this property
      *  accordingly.
      *
      *  @langversion 3.0
@@ -1195,11 +1292,11 @@
     [Inspectable(environment="none")]

     /**
-     *  The default value for the GridColumn imeMode property, which specifies
-     *  specifies the IME (input method editor) mode.
+     *  The default value for the GridColumn imeMode property,
+     *  which specifies the IME (Input Method Editor) mode.
      *  The IME enables users to enter text in Chinese, Japanese, and Korean.
-     *  Flex sets the specified IME mode when the control gets the focus,
-     *  and sets it back to the previous value when the control loses the focus.
+     *  Flex sets the specified IME mode when the control gets focus,
+     *  and sets it back to the previous value when the control loses focus.
      *
      *
The flash.system.IMEConversionMode class defines constants for the
      *  valid values for this property.
@@ -1236,13 +1333,13 @@
     [Bindable("itemEditorChanged")]

     /**
-     *  The default value for the GridColumn itemEditor property, which specifies
-     *  the IGridItemEditor class used to create item editor instances.
+     *  The default value for the GridColumn itemEditor property,
+     *  which specifies the IGridItemEditor class used to create item editor instances.
      *
      *  @default null.
      *
      *  @see #dataField
-     *  @see GridItemRenderer
+     *  @see spark.components.gridClasses.IGridItemEditor
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1281,7 +1378,7 @@
      *  class of the item editor and, therefore, the data type of the item
      *  editor instance.

      *
-     *
You do not set this property in MXML.

+     *
Do not set this property in MXML.

      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1304,6 +1401,10 @@

     /**
      *  @copy spark.components.Grid#itemRenderer
+     *
+     *  @default DefaultGridItemRenderer
+     *
+     *  @see spark.skins.spark.DefaultGridItemRenderer
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1330,6 +1431,8 @@

     /**
      *  @copy spark.components.Grid#preserveSelection
+     *
+     *  @default true
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1361,6 +1464,8 @@

     /**
      *  @copy spark.components.Grid#requireSelection
+     *
+     *  @default true
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1392,6 +1497,8 @@

     /**
      *  @copy spark.components.Grid#requestedRowCount
+     *
+     *  @default -1
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1417,6 +1524,8 @@

     /**
      *  @copy spark.components.Grid#requestedColumnCount
+     *
+     *  @default -1
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1442,6 +1551,8 @@

     /**
      *  @copy spark.components.Grid#requestedMaxRowCount
+     *
+     *  @default 10
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1467,6 +1578,8 @@

     /**
      *  @copy spark.components.Grid#requestedMinRowCount
+     *
+     *  @default -1
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1492,6 +1605,8 @@

     /**
      *  @copy spark.components.Grid#requestedMinColumnCount
+     *
+     *  @default -1
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1519,6 +1634,8 @@

     /**
      *  @copy spark.components.Grid#resizableColumns
+     *
+     *  @default true
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1675,12 +1792,12 @@
     [Inspectable(category="General")]

     /**
-     *  A flag that indicates whether the user can interactively sort columns.
-     *  If true, the user can sort the dataProvider by the
-     *  dataField of a column by clicking on the column's header.
-     *  If true, individual columns must have their
-     *  sortable properties set to false to
-     *  prevent the user from sorting by a particular column.
+     *  Specifies whether the user can interactively sort columns.
+     *  If true, the user can sort the data provider by the
+     *  data field of a column by clicking on the column's header.
+     *  If true, an individual column can set its
+     *  sortable property to false to
+     *  prevent the user from sorting by that column.
      *
      *  @default true
      *
@@ -1715,6 +1832,8 @@
     /**
      *  @copy spark.components.Grid#typicalItem
      *
+     *  @default null
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
@@ -1735,7 +1854,7 @@
     }

     /**
-     *  @copy spark.components.Grid#invalidateTypicalItem
+     *  @copy spark.components.Grid#invalidateTypicalItem()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1756,6 +1875,8 @@

     /**
      *  @copy spark.components.Grid#variableRowHeight
+     *
+     *  @default false
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2244,6 +2365,8 @@

     /**
      *  @copy spark.components.Grid#selectedCell
+     *
+     *  @default null
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2324,6 +2447,8 @@

     /**
      *  @copy spark.components.Grid#selectedIndex
+     *
+     *  @default -1
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2364,7 +2489,7 @@

     /**
      *  @copy spark.components.Grid#selectedIndices
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
@@ -2402,6 +2527,8 @@

     /**
      *  @copy spark.components.Grid#selectedItem
+     *
+     *  @default null
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2577,7 +2704,7 @@
     //----------------------------------

     /**
-     *  @copy spark.components.Grid#selectionContainsIndex
+     *  @copy spark.components.Grid#selectionContainsIndex()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2593,7 +2720,7 @@
     }

     /**
-     *  @copy spark.components.Grid#selectionContainsIndices
+     *  @copy spark.components.Grid#selectionContainsIndices()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2609,7 +2736,7 @@
     }

     /**
-     *  @copy spark.components.Grid#setSelectedIndex
+     *  @copy spark.components.Grid#setSelectedIndex()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2635,7 +2762,7 @@
     }

     /**
-     *  @copy spark.components.Grid#addSelectedIndex
+     *  @copy spark.components.Grid#addSelectedIndex()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2661,7 +2788,7 @@
     }

     /**
-     *  @copy spark.components.Grid#removeSelectedIndex
+     *  @copy spark.components.Grid#removeSelectedIndex()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2687,7 +2814,7 @@
     }

     /**
-     *  @copy spark.components.Grid#setSelectedIndices
+     *  @copy spark.components.Grid#selectIndices()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2717,7 +2844,7 @@
     //----------------------------------

     /**
-     *  @copy spark.components.Grid#selectionContainsCell
+     *  @copy spark.components.Grid#selectionContainsCell()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2733,7 +2860,7 @@
     }

     /**
-     *  @copy spark.components.Grid#selectionContainsCellRegion
+     *  @copy spark.components.Grid#selectionContainsCellRegion()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2756,7 +2883,7 @@
     }

     /**
-     *  @copy spark.components.Grid#setSelectedCell
+     *  @copy spark.components.Grid#setSelectedCell()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2782,7 +2909,7 @@
     }

     /**
-     *  @copy spark.components.Grid#addSelectedCell
+     *  @copy spark.components.Grid#addSelectedCell()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2808,7 +2935,7 @@
     }

     /**
-     *  @copy spark.components.Grid#removeSelectedCell
+     *  @copy spark.components.Grid#removeSelectedCell()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2834,7 +2961,7 @@
     }

     /**
-     *  @copy spark.components.Grid#selectCellRegion
+     *  @copy spark.components.Grid#selectCellRegion()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -2864,26 +2991,28 @@

     /**
      *  In response to user input (mouse or keyboard) which changes the
-     *  selection, this dispatches the "selectionChanging" event, and if the
-     *  event is not cancelled, commits the selection change and then
-     *  dispatches the "selectionChange" event.  The caret is not udpated here.
-     *  To detect if the caret has changed use the "caretChanged" event.
-     *
-     *  @param selectionEventKind The GridSelectionEventKind of
-     *  selection that is being committed.  If not null, this will be used to
+     *  selection, this method dispatches the selectionChanging event.
+     *  If the event is not canceled, it then commits the selection change, and then
+     *  dispatches the selectionChange event.
+     *  The caret location is not updated.
+     *  To detect if the caret has changed, use the caretChanged event.
+     *
+     *  @param selectionEventKind A constant defined by the GridSelectionEventKind class
+     *  that specifies the selection that is being committed.  If not null, this is used to
      *  generate the selectionChanging event.
      *
      *  @param rowIndex If selectionEventKind is for a row or a
-     *  cell, the 0-based rowIndex of the selection in the
-     *  dataProvider. If selectionEventKind is
-     *  for multiple cells, the 0-based rowIndex of the origin of the
+     *  cell, the 0-based rowIndex of the selection in the
+     *  data provider.
+     *  If selectionEventKind is
+     *  for multiple cells, the 0-based rowIndex of the origin of the
      *  cell region. The default is -1 to indicate this
      *  parameter is not being used.
      *
      *  @param columnIndex If selectionEventKind is for a single row or
-     *  a single cell, the 0-based columnIndex of the selection in
-     *  columns. If selectionEventKind is for multiple
-     *  cells, the 0-based columnIndex of the origin of the
+     *  a single cell, the 0-based columnIndex of the selection.
+     *  If selectionEventKind is for multiple
+     *  cells, the 0-based columnIndex of the origin of the
      *  cell region. The default is -1 to indicate this
      *  parameter is not being used.
      *
@@ -2896,13 +3025,13 @@
      *  indicate this parameter is not being used.
      *
      *  @param indices If selectionEventKind is for multiple rows,
-     *  the 0-based row indicies of the rows in the selection.  The default is
+     *  the 0-based row indices of the rows in the selection.  The default is
      *  null to indicate this parameter is not being used.
      *
-     *  @return True if the selection was committed, or false if the selection
-     *  was cancelled or could not be committed due to an error, such as
+     *  @return true if the selection was committed, or false
+     *  if the selection was canceled or could not be committed due to an error, such as
      *  index out of range or the selectionEventKind is not compatible
-     *  s the selectionMode.
+     *  with the selectionMode.
      *
      *  @see spark.events.GridSelectionEvent#SELECTION_CHANGE
      *  @see spark.events.GridSelectionEvent#SELECTION_CHANGING
@@ -3038,8 +3167,9 @@
     }

     /**
-     *  Updates the grid's caret position.  If the caret position changes
-     *  a GridCaretEvent.CARET_CHANGE event will be dispatched by grid.
+     *  Updates the grid's caret position.
+     *  If the caret position changes, the grid skin part dispatches a
+     *  caretChange event.
      *
      *  @param newCaretRowIndex The 0-based rowIndex of the new caret position.
      *
@@ -3173,20 +3303,22 @@
     //--------------------------------------------------------------------------

     /**
-     *  Starts an editor session on a selected cell in the data grid.
+     *  Starts an editor session on a selected cell in the grid.
      *
      *  A startItemEditorSession event is dispatched before
      *  an item editor is created. This allows a listener dynamically change
      *  the item editor for a specified cell.
      *
-     *  The event can also be cancelled with preventDefault(), to prevent the
+     *  The event can also be cancelled by calling the
+     *  preventDefault() method, to prevent the
      *  editor session from being created.
      *
      *  @param rowIndex The zero-based row index of the cell to edit.
+     *
      *  @param columnIndex The zero-based column index of the cell to edit.
      *
-     *  @return true if the editor session was started. Returns false if
-     *  the editor session was cancelled.
+     *  @return true if the editor session was started.
+     *  Returns false if the editor session was cancelled.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -3204,14 +3336,15 @@

     /**
      *  Closes the currently active editor and optionally saves the editor's value
-     *  by calling the item editor's save() method.  If the cancel parameter is true,
-     *  then the editor's cancel() method is called instead.
-     *
-     *  @param cancel If false the data in the editor is saved.
+     *  by calling the item editor's save() method.
+     *  If the cancel parameter is true,
+     *  then the editor's cancel() method is called instead.
+     *
+     *  @param cancel If false, the data in the editor is saved.
      *  Otherwise the data in the editor is discarded.
      *
-     *  @return true if the editor session was saved, false if the save was
-     *  cancelled.
+     *  @return true if the editor session was saved,
+     *  and false if the save was cancelled.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -3242,18 +3375,18 @@
     //--------------------------------------------------------------------------

     /**
-     *  Sort the DataGrid by one or more columns and refresh the display.
-     *
-     *
If the dataProvider is an ICollectionView, then it's sort property will be
-     *  set to a value based on each column's dataField, sortCompareFunction,
-     *  and sortDescending flag, and then the dataProvider's refresh() method will be called.
-     *

-     *
-     *
If the dataProvider is not an ICollectionView, then this method has no effect.

-     *
-     *  @param columnIndices The indices of the columns by which to sort the dataProvider.
-     *
-     *  @return true if the dataProvider can be sorted with the provided column indices.
+     *  Sort the DataGrid by one or more columns, and refresh the display.
+     *
+     *
If the dataProvider is an ICollectionView, then it's sort property is
+     *  set to a value based on each column's dataField, sortCompareFunction,
+     *  and sortDescending flag.
+     *  Then, the data provider's refresh() method is called.

+     *
+     *
If the dataProvider is not an ICollectionView, then this method has no effect.

+     *
+     *  @param columnIndices The indices of the columns by which to sort the dataProvider.
+     *
+     *  @return true if the dataProvider can be sorted with the provided column indices.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -3713,7 +3846,7 @@
     }

     /**
-     *  @copy spark.components.gridClasses.Grid#ensureCellIsVisible
+     *  @copy spark.components.Grid#ensureCellIsVisible()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 14095
Author:   cframpto@adobe.com
Date:     2010-02-10T17:33:30.511669Z

Log Message:
-----------
Merge 14076 from 4.x branch to trunk.

Revision: 14076
Author:   cframpto@adobe.com
Date:     2010-02-09 15:23:15 -0800 (Tue, 09 Feb 2010)
Log Message:
***********
Add UIComponent.mapKeycodeForLayoutDirection().  This should be called by any keyDownHandlers() which handles Keyboard.LEFT and Keyboard.RIGHT, and optionally for Keyboard.UP and Keyboard.DOWN, if they behave like Keyboard.LEFT and Keyboard.RIGHT.  If the layoutDirection="rtl", it maps LEFT to RIGHT, RIGHT to LEFT, UP to RIGHT and DOWN to LEFT.  This allows the keyDownHandler() to perform the correct action without adding lots of special case code to the key handling code.

QE notes: For layoutDirection="rtl" need to test LEFT, RIGHT, UP and DOWN keys.
Doc notes: None
Bugs: SDK-25330
Reviewed By: Hans
Tests run: checkintests
Is noteworthy for integration: No

Ticket Links:
***********
    http://bugs.adobe.com/jira/browse/SDK-25330

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk/frameworks</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.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/framework/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/SliderThumb.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -929,10 +929,14 @@
             switch (event.keyCode)
             {
                 case Keyboard.LEFT:
-                    hspDelta = vp.getHorizontalScrollPositionDelta(NavigationUnit.LEFT);
+                    hspDelta = (layoutDirection == "ltr") ?
+                        vp.getHorizontalScrollPositionDelta(NavigationUnit.LEFT) :
+                        vp.getHorizontalScrollPositionDelta(NavigationUnit.RIGHT);
                     break;
                 case Keyboard.RIGHT:
-                    hspDelta = vp.getHorizontalScrollPositionDelta(NavigationUnit.RIGHT);
+                    hspDelta = (layoutDirection == "ltr") ?
+                        vp.getHorizontalScrollPositionDelta(NavigationUnit.RIGHT) :
+                        vp.getHorizontalScrollPositionDelta(NavigationUnit.LEFT);
                     break;
                 case Keyboard.HOME:
                     hspDelta = vp.getHorizontalScrollPositionDelta(NavigationUnit.HOME);
@@ -943,12 +947,20 @@
                 // If there's no vertical scrollbar, then map page up/down to
                 // page left,right
                 case Keyboard.PAGE_UP:
-                     if (!verticalScrollBar || !(verticalScrollBar.visible))
-                         hspDelta = vp.getHorizontalScrollPositionDelta(NavigationUnit.PAGE_LEFT);
+                     if (!verticalScrollBar || !(verticalScrollBar.visible))
+                     {
+                         hspDelta = (layoutDirection == "ltr") ?
+                             vp.getHorizontalScrollPositionDelta(NavigationUnit.LEFT) :
+                             vp.getHorizontalScrollPositionDelta(NavigationUnit.RIGHT);
+                     }
                      break;
                 case Keyboard.PAGE_DOWN:
-                     if (!verticalScrollBar || !(verticalScrollBar.visible))
-                         hspDelta = vp.getHorizontalScrollPositionDelta(NavigationUnit.PAGE_RIGHT);
+                     if (!verticalScrollBar || !(verticalScrollBar.visible))
+                     {
+                         hspDelta = (layoutDirection == "ltr") ?
+                             vp.getHorizontalScrollPositionDelta(NavigationUnit.RIGHT) :
+                             vp.getHorizontalScrollPositionDelta(NavigationUnit.LEFT);
+                     }
                      break;
             }
             if (!isNaN(hspDelta))


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

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

 package spark.components
 {


trim and empty

trim and empty

--- source/com/kemsky/Stream.as
+++ source/com/kemsky/Stream.as
@@ -617,7 +617,7 @@
         }

         /**
-         * Removes item (using strict equals ===).
+         * Removes item (compare using strict equals ===).
          * @param item target item.
          * @return true if remove was successful.
          * @example


improved JS.compile() error reporting

improved JS.compile() error reporting

--- WeaveJS/src/weavejs/util/JS.as
+++ WeaveJS/src/weavejs/util/JS.as
@@ -45,12 +45,16 @@
 		{
 			try
 			{
+				// normalize line endings
+				script = StandardLib.replace(script, '\r\n', '\n', '\r', '\n');
+
 				var isFunc:Boolean = unnamedFunctionRegExp.test(script);
 				if (isFunc)
 					script = "(" + StandardLib.trim(script) + ")";
-				// first try wrapping the script in "return eval(script)"
+				// first try wrapping the script in "return eval(script)" to support scripts like "2+2"
 				var args:Array = (paramNames || []).concat("return eval(" + JSON.stringify(script) + ");");
 				var func:Function = Function['apply'](null, args);
+				// if it's a function definition, make func that function definition
 				if (isFunc)
 					func = func();
 				return function():* {
@@ -60,7 +64,7 @@
 					}
 					catch (e:Error)
 					{
-						// will get SyntaxError if script uses a return statement outside a function
+						// will get SyntaxError if script uses a return statement outside a function like "return 2+2"
 						if (e is SyntaxError)
 						{
 							args.pop();
@@ -76,38 +80,40 @@
 								if (e2 is SyntaxError)
 									func = Function['apply']();

-								improveScriptError(e2, 'evaluating', script, paramNames);
-								if (errorHandler != null)
-									return errorHandler(e2);
-								else
-									throw e2;
+								return handleScriptError(e2, 'compiling', script, paramNames, errorHandler);
 							}
-							return func.apply(this, arguments);
+
+							try
+							{
+								return func.apply(this, arguments);
+							}
+							catch (e3:Error)
+							{
+								return handleScriptError(e3, 'evaluating', script, paramNames, errorHandler);
+							}
 						}
-
-						improveScriptError(e, 'evaluating', script, paramNames);
-						if (errorHandler != null)
-							return errorHandler(e);
-						else
-							throw e;
+						return handleScriptError(e, 'evaluating', script, paramNames, errorHandler);
 					}
 				};
 			}
 			catch (e:Error)
 			{
-				improveScriptError(e, 'compiling', script, paramNames);
-				if (errorHandler != null)
-					errorHandler(e);
+				// always throw when initial compile fails
+				handleScriptError(e, 'compiling', script, paramNames, errorHandler);
 				throw e;
 			}
 		}

-		private static function improveScriptError(e:Error, doingWhat:String, script:String, paramNames:Array):void
-		{
-			script = StandardLib.replace(script, '\r\n','\n', '\r','\n', '\n','\n\t');
+		private static function handleScriptError(e:Error, doingWhat:String, script:String, paramNames:Array, errorHandler:Function):*
+		{
+			script = StandardLib.replace(script, '\n','\n\t');
 			script = StandardLib.trim(script);
 			var paramsStr:String = paramNames && paramNames.length ? ' with params (' + paramNames.join(', ') + ')' : '';
 			e.message = StandardLib.substitute('Error {0} script{1}:\n\t{2}\n{3}', doingWhat, paramsStr, script, e.message);
+			if (errorHandler != null)
+				return errorHandler(e);
+			else
+				throw e;
 		}

 		/**


improved JS.compile() script error messages

--- WeaveJS/src/weavejs/util/JS.as
+++ WeaveJS/src/weavejs/util/JS.as
@@ -43,50 +43,71 @@
 		 */
 		public static function compile(script:String, paramNames:Array/*/<string>/*/ = null, errorHandler:/*/(e:Error)=>void/*/Function = null):Function
 		{
-			var isFunc:Boolean = unnamedFunctionRegExp.test(script);
-			if (isFunc)
-				script = "(" + script + ")";
-			// first try wrapping the script in "return eval(script)"
-			var args:Array = (paramNames || []).concat("return eval(" + JSON.stringify(script) + ");");
-			var func:Function = Function['apply'](null, args);
-			if (isFunc)
-				func = func();
-			return function():* {
-				try
-				{
-					return func.apply(this, arguments);
-				}
-				catch (e:Error)
-				{
-					// will get SyntaxError if script uses a return statement outside a function
-					if (e is SyntaxError)
+			try
+			{
+				var isFunc:Boolean = unnamedFunctionRegExp.test(script);
+				if (isFunc)
+					script = "(" + StandardLib.trim(script) + ")";
+				// first try wrapping the script in "return eval(script)"
+				var args:Array = (paramNames || []).concat("return eval(" + JSON.stringify(script) + ");");
+				var func:Function = Function['apply'](null, args);
+				if (isFunc)
+					func = func();
+				return function():* {
+					try
 					{
-						args.pop();
-						args.push(script);
-						try
-						{
-							// overwrite func with original script
-							func = Function['apply'](null, args);
-						}
-						catch (e2:Error)
-						{
-							// on syntax error, overwrite func with one that does nothing so we don't get an error next time
-							if (e2 is SyntaxError)
-								func = Function['apply']();
-
-							if (errorHandler != null)
-								return errorHandler(e2);
-							else
-								throw e2;
-						}
 						return func.apply(this, arguments);
 					}
-					if (errorHandler != null)
-						return errorHandler(e);
-					else
-						throw e;
-				}
-			};
+					catch (e:Error)
+					{
+						// will get SyntaxError if script uses a return statement outside a function
+						if (e is SyntaxError)
+						{
+							args.pop();
+							args.push(script);
+							try
+							{
+								// overwrite func with original script
+								func = Function['apply'](null, args);
+							}
+							catch (e2:Error)
+							{
+								// on syntax error, overwrite func with one that does nothing so we don't get an error next time
+								if (e2 is SyntaxError)
+									func = Function['apply']();
+
+								improveScriptError(e, 'evaluating', script, paramNames);
+								if (errorHandler != null)
+									return errorHandler(e2);
+								else
+									throw e2;
+							}
+							return func.apply(this, arguments);
+						}
+
+						improveScriptError(e, 'evaluating', script, paramNames);
+						if (errorHandler != null)
+							return errorHandler(e);
+						else
+							throw e;
+					}
+				};
+			}
+			catch (e:Error)
+			{
+				improveScriptError(e, 'compiling', script, paramNames);
+				if (errorHandler != null)
+					errorHandler(e);
+				throw e;
+			}
+		}
+
+		private static function improveScriptError(e:Error, doingWhat:String, script:String, paramNames:Array):void
+		{
+			script = StandardLib.replace(script, '\r\n','\n', '\r','\n', '\n','\n\t');
+			script = StandardLib.trim(script);
+			var paramsStr:String = paramNames && paramNames.length ? ' with params (' + paramNames.join(', ') + ')' : '';
+			e.message = StandardLib.substitute('Error {0} script{1}:\n\t{2}\n{3}', doingWhat, paramsStr, script, e.message);
 		}

 		/**


Dispatch terminated from shutdownNow if needed

--- runtime/src/main/as/flump/executor/Executor.as
+++ runtime/src/main/as/flump/executor/Executor.as
@@ -46,11 +46,10 @@
         if (!removed) throw new Error("Unknown future completed? " + f);
         // Only dispatch terminated if it was set when this future completed. If it's set as
         // part of this dispatch, it'll dispatch in the shutdown call
-        const wasShutdown :Boolean = _shutdown
         completed.dispatch(f);

         runIfAvailable();
-        if (_running.length == 0 && wasShutdown) terminated.dispatch(this);
+        terminateIfNecessary();
     }

     /** Submits all the functions through submit and returns their Futures. */
@@ -108,7 +107,7 @@
     public function get isIdle () :Boolean { return _running.length == 0 && _toRun.length == 0; }

     /** Returns true if shutdown has been called and there are no pending or running jobs. */
-    public function get isTerminated () :Boolean { return isShutdown && isIdle; }
+    public function get isTerminated () :Boolean { return _terminated; }

     /**
      * Prevents additional jobs from being submitted to this Executor. Jobs that have already been
@@ -117,9 +116,8 @@
      * will be dispatched immediately.
      */
     public function shutdown () :void {
-        const wasShutdown :Boolean = _shutdown;
         _shutdown = true;
-        if (!wasShutdown && isIdle) terminated.dispatch(this);
+        terminateIfNecessary();
     }

     /**
@@ -136,7 +134,14 @@
             cancelled.push(toRun.f);
         }
         _toRun = new Vector.<ToRun>();
+        terminateIfNecessary();
         return cancelled;
+    }
+
+    protected function terminateIfNecessary () :void {
+        if (_terminated || !isIdle) return;
+        _terminated = true;
+        terminated.dispatch(this);
     }

     protected function handleTimer (event :TimerEvent) :void {
@@ -147,6 +152,7 @@

     protected var _maxSimultaneous :int;
     protected var _shutdown :Boolean;
+    protected var _terminated :Boolean;
     protected var _running :Vector.<Future> = new Vector.<Future>();
     protected var _toRun :Vector.<ToRun> = new Vector.<ToRun>();
     protected var _timer :Timer = new Timer(1);


Transferred from the Adobe Open Source Subversion Repository

Revision: 11942
Author:   dloverin@adobe.com
Date:     2009-11-18T17:33:13.065717Z

Log Message:
-----------
StyleManager fixes.

Stop using the styleManager property in a constructor.
framework/src/mx/containers/DividedBox.as
framework/src/mx/containers/Form.as
framework/src/mx/controls/ButtonBar.as

Cache inheriting styles. Also made static arrays in StyleManagerImpl per-instance.
framework/src/mx/events/FlexChangeEvent.as
framework/src/mx/styles/StyleManagerImpl.as

Remove static StyleManager methods that were new to Flex 4 (qualifiedTypeSelectors property, getStyleDeclarations(), hasAdvancedSelectors(), hasPseudoCondition()).
framework/src/mx/styles/StyleManager.as

Update copyright.
framework/src/mx/styles/CSSMergedStyleDeclaration.as

QE notes: None.
Doc notes: None.
Bugs: SDK-24215
Reviewer: Alex
Tests run: checkintests, containers/DividedBox, containers/form, components/ButtonBar, Managers/StyleManager, PerModuleStyleManager
Is noteworthy for integration: yes - StyleManager performance improvement

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSMergedStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Form.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexChangeEvent.as</path>

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

--- frameworks/projects/framework/src/mx/events/FlexChangeEvent.as
+++ frameworks/projects/framework/src/mx/events/FlexChangeEvent.as
@@ -97,13 +97,20 @@
      */
     public static const REMOVE_CHILD_BRIDGE:String = "removeChildBridge";

-
     /**
      *  @private
      *
-     *  Dispatched by a CSSStyleDeclaration when a style property is changed.
+     *  Dispatched by a StyleManager when a style property is changed.
+     *
+     *  The data parameter is an object that describes what changed:
+     *
+     *  "property" - This property describes what kind of style manager
+     *  property changed.
+     *  If the "property" property is "inheritingStyles" then the
+     *  StyleManager's inheritingStyles property was updated.
+     *
      */
-    public static const STYLE_CHANGED:String = "styleChanged";
+    public static const STYLE_MANAGER_CHANGE:String = "styleManagerChange";

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 10075
Author:   rfrishbe@adobe.com
Date:     2009-09-09T01:01:58.077369Z

Log Message:
-----------
Cleanups from the spark text changes and some bug fixes for VideoElement.  Also some PARB changes for UIComponent.

TitleBar: Changing the skin part type from Label to Textbase

UIComponent: skipMeasure()->canSkipMeasurement() to be in line with GraphicElement.  This has been PARB approved.
UIComponent: same with hasComplexLayoutMatrix...this replaces hasDeltaIdentityTransform.  This has been PARB approved.

StyleProtoChain: cleanup around what interfaces to use

TextBase: clean up code that’s no longer needed.

VideoElement: Fixing 4 bugs:
SDK-22824: sourceLastPlayed keeps track of what video file we’ve called play() with last.  This way if a user pauses the video and wants to start it up again at the same point, we can call play(null) on the underlying FLVPlayback videoPlayer.  However, anytime the souce changes, we want to null out sourceLastPlayed.  This was causing a bug when someone set the source to null and then reset it to it’s previous value.

SDK-23034 (GUMBO_PRIORITY): This deals with some FLVPlayback quirks around sizing.  I had put in a fix so we weren’t setting width/height on the underlying videoPlayer too many times, but apparently we need to make sure it always gets called once.  Hopefully when switching to Strobe we can cleanup this logic...I put a FIXME in to do this.

SDK-21947/ SDK-22533 - some video files don’t always send out a metadata event.  I’m not quite sure why this is, but in case this happens, we do a check in the ready handler to see whether we should call invalidateSize() to make sure it gets sized properly.

QE notes:-
Doc notes:-
Bugs: SDK-22824, SDK-23034, SDK-21947, SDK-22533
Reviewer: Glenn, Corey
Tests run: checkintests, Button, GraphicTags, VideoElement, and VideoPlayer (some VideoPlayer were failing, but I think it should be fine)
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.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/supportClasses/Skin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/RemoveActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.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/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as</path>

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

--- frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
+++ frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
@@ -728,15 +728,10 @@
         }

         object.invalidateDisplayList();
-
-        // FIXME (gosmith): Unify concept of parent for UIComponents and GraphicElements
+
         var parent:IInvalidating;
-        if (object is UIComponent)
-            parent = UIComponent(object).parent as IInvalidating;
-        else if ("parent" in object) // object is TextBase
-            parent = object["parent"] as IInvalidating;
-
-        // FIXME (rfrishbe): clean up this logic around TextBase...now it's a UIC, so we don't need it anymore
+        if (object is IVisualElement)
+            parent = IVisualElement(object).parent as IInvalidating;

         if (parent)
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17107
Author:   aharui@adobe.com
Date:     2010-07-28T22:56:52.689490Z

Log Message:
-----------
Merge 16736 from 3.x to Hero

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/ListItemDragProxy.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridDragProxy.as</path>

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as
@@ -3162,10 +3162,8 @@
      *  If the height of the component has been explicitly set,
      *  this property might not have any effect.
      *
-     *
For a DataGrid control, the rowCount property includes the
-     *  header row.
-     *  So, for a DataGrid control with 3 body rows and a header row,
-     *  the rowCount property is 4.

+     *
For a DataGrid control, the rowCount property does
+     *  not include the header row.

      *
      *  @default 4
      *