Transferred from the Adobe Open Source Subversion Repository

Revision: 4866
Author:   hmuller@adobe.com
Date:     2009-02-05T22:14:08.037552Z

Log Message:
-----------
Bug fixes, notably support for "canceling" keyboard events that drive scrolling.  Added mouse-wheel scrolling to FxScroller.

QE Notes:
Doc Notes: None
Bugs: sdk-19027, sdk-19028, sdk-18903, sdk-18673
Reviewer: Evtim, Alex

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxRange.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -12,7 +12,10 @@

 package mx.components
 {
+import flash.events.FocusEvent;
+import flash.events.MouseEvent;
 import flash.events.KeyboardEvent;
+import flash.text.TextField;
 import flash.ui.Keyboard;

 import mx.components.baseClasses.FxComponent;
@@ -122,9 +125,15 @@
     //----------------------------------

     [SkinPart(required="true")]
-
-    /**
-     * A skin part that defines the horizontal scrollbar.
+    [Bindable]
+
+    /**
+     *  A skin part that defines the horizontal scrollbar.
+     *
+     *  This property should be considered read-only, it's only
+     *  set by the FxScroller's skin.
+     *
+     *  This property is Bindable.
      */
     public var horizontalScrollBar:FxHScrollBar;

@@ -133,24 +142,32 @@
     //----------------------------------

     [SkinPart(required="true")]
-
-    /**
-     * A skin part that defines the vertical scrollbar.
+    [Bindable]
+
+    /**
+     *  A skin part that defines the vertical scrollbar.
+     *
+     *  This property should be considered read-only, it's only
+     *  set by the FxScroller's skin.
+     *
+     *  This property is Bindable.
      */
     public var verticalScrollBar:FxVScrollBar;
-
+
+
     //----------------------------------
     //  viewport - default property
     //----------------------------------

     private var _viewport:IViewport;

-    [Bindable]
+    [Bindable(event="viewportChanged")]

     /**
      *  The viewport component to be scrolled.
      *
-     *
The viewport is added to the FXScroller component's skin
+     *

+     *  The viewport is added to the FXScroller component's skin
      *  which lays out both the viewport and scrollbars.
      *
      *  When the viewport property is set, the viewport's clipContent property is
@@ -159,6 +176,10 @@
      *  Scroller does not support rotating the viewport directly.  The viewport's
      *  contents can be transformed arbitrarily but the viewport itself can not.
      *

+     *
+     *  This property is Bindable.
+     *
+     *  @default null
      */
     public function get viewport():IViewport
     {
@@ -172,9 +193,11 @@
     {
         if (value == _viewport)
             return;
+
         uninstallViewport();
         _viewport = value;
         installViewport();
+        dispatchEvent(new Event("viewportChanged"));
     }

     private function installViewport():void
@@ -522,11 +545,16 @@
      */
     override protected function keyDownHandler(event:KeyboardEvent):void
     {
+        super.keyDownHandler(event);
+
         var vp:IViewport = viewport;
-        if (!vp)
+        if (!vp || event.isDefaultPrevented())
             return;
-
-        // TBD: is special handling for textfields needed here, as in mx.core.Container?
+
+        // If a TextField has the focus, then assume it will handle all keyboard
+        // events, and that it will not use Event.preventDefault().
+        if (getFocus() is TextField)
+            return;

         if (verticalScrollBar && verticalScrollBar.visible)
         {
@@ -555,6 +583,7 @@
             if (!isNaN(vspDelta))
             {
                 vp.verticalScrollPosition += vspDelta;
+                event.preventDefault();
             }
         }

@@ -589,9 +618,59 @@
             if (!isNaN(hspDelta))
             {
                 vp.horizontalScrollPosition += hspDelta;
+                event.preventDefault();
             }
         }
     }
+
+    private function mouseWheelHandler(event:MouseEvent):void
+    {
+        var vp:IViewport = viewport;
+        if (!vp || event.isDefaultPrevented())
+            return;
+
+        var nSteps:uint = Math.abs(event.delta);
+        var unit:ScrollUnit;
+
+        if (verticalScrollBar && verticalScrollBar.visible)
+        {
+            unit = (event.delta < 0) ? ScrollUnit.DOWN : ScrollUnit.UP;
+            for(var vStep:int = 0; vStep < nSteps; vStep++)
+            {
+                var vspDelta:Number = vp.getVerticalScrollPositionDelta(unit);
+                if (!isNaN(vspDelta))
+                    vp.verticalScrollPosition += vspDelta;
+            }
+            event.preventDefault();
+        }
+        else if (horizontalScrollBar && horizontalScrollBar.visible)
+        {
+            unit = (event.delta < 0) ? ScrollUnit.LEFT : ScrollUnit.RIGHT;
+            for(var hStep:int = 0; hStep < nSteps; hStep++)
+            {
+                var hspDelta:Number = vp.getHorizontalScrollPositionDelta(unit);
+                if (!isNaN(hspDelta))
+                    vp.horizontalScrollPosition += hspDelta;
+            }
+            event.preventDefault();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function focusInHandler(event:FocusEvent):void
+    {
+         addSystemHandlers(MouseEvent.MOUSE_WHEEL, mouseWheelHandler, mouseWheelHandler);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function focusOutHandler(event:FocusEvent):void
+    {
+        removeSystemHandlers(MouseEvent.MOUSE_WHEEL, mouseWheelHandler, mouseWheelHandler);
+    }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3057
Author:   jimurphy@adobe.com
Date:     2008-09-02T15:18:38.819662Z

Log Message:
-----------
Merged 3.0.x revisions [2966,2969,2995,3004,3018-3019,3023,3029-3030,3046,3049,3052] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/ModalWindowRequest.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/managers/dragClasses/DragProxy.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/PopUpRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.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/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/SliderThumb.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/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SizeRequest.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/SWFLoader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/InterManagerRequest.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterManagerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FocusRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDL.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/dividedBoxClasses/BoxDivider.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/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootDragEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.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/managers/SystemManager.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxMouseEvent.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/managers/SystemManagerProxy.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/EventUtil.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.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/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>

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

--- frameworks/projects/mx/src/mx/controls/DateField.as
+++ frameworks/projects/mx/src/mx/controls/DateField.as
@@ -37,7 +37,7 @@
 import mx.events.DropdownEvent;
 import mx.events.FlexEvent;
 import mx.events.FlexMouseEvent;
-import mx.events.SandboxRootMouseEvent;
+import mx.events.SandboxMouseEvent;
 import mx.managers.IFocusManagerComponent;
 import mx.managers.PopUpManager;
 import mx.styles.CSSStyleDeclaration;
@@ -2229,9 +2229,9 @@
                                    dropdown_mouseDownOutsideHandler);
         _dropdown.addEventListener(FlexMouseEvent.MOUSE_WHEEL_OUTSIDE,
                                    dropdown_mouseDownOutsideHandler);
-        _dropdown.addEventListener(SandboxRootMouseEvent.MOUSE_DOWN_SOMEWHERE,
+        _dropdown.addEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE,
                                    dropdown_mouseDownOutsideHandler);
-        _dropdown.addEventListener(SandboxRootMouseEvent.MOUSE_WHEEL_SOMEWHERE,
+        _dropdown.addEventListener(SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE,
                                    dropdown_mouseDownOutsideHandler);

         creatingDropdown = false;
@@ -2475,7 +2475,7 @@
             if (! hitTestPoint(mouseEvent.stageX, mouseEvent.stageY, true))
                 displayDropdown(false, event);
         }
-        else if (event is SandboxRootMouseEvent)
+        else if (event is SandboxMouseEvent)
             displayDropdown(false, event);

     }


Update src/aerys/minko/render/geometry/stream/VertexStream.as

fix calc index at getMinMaxBetween

--- src/aerys/minko/render/geometry/stream/VertexStream.as
+++ src/aerys/minko/render/geometry/stream/VertexStream.as
@@ -243,9 +243,9 @@
 				max[i] = -Number.MAX_VALUE;
 			}

-			for (i = firstIndex; i < numVertices; ++i)
-			{
-				index 			= indexStream != null ? indexStream.get(i) : i;
+			for (i = 0; i < numVertices; ++i)
+			{
+				index 			= indexStream != null ? indexStream.get(firstIndex + i) : i;
 				_data.position	= (index * stride + offsetComponents) * 4;
 				for (j = 0; j < vectorLength; ++j)
 				{


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/rpc/src/mx/rpc/soap/SOAPEncoder.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/SOAPEncoder.as
@@ -0,0 +1,845 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.soap
+{
+
+import flash.xml.XMLDocument;
+import flash.xml.XMLNode;
+
+import mx.core.mx_internal;
+import mx.logging.ILogger;
+import mx.logging.Log;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+import mx.rpc.soap.types.ICustomSOAPType;
+import mx.rpc.wsdl.WSDLConstants;
+import mx.rpc.wsdl.WSDLEncoding;
+import mx.rpc.wsdl.WSDLOperation;
+import mx.rpc.wsdl.WSDLMessage;
+import mx.rpc.wsdl.WSDLMessagePart;
+import mx.rpc.xml.Schema;
+import mx.rpc.xml.SchemaConstants;
+import mx.rpc.xml.SchemaDatatypes;
+import mx.rpc.xml.SchemaMarshaller;
+import mx.rpc.xml.XMLEncoder;
+
+[ResourceBundle("rpc")]
+
+[ExcludeClass]
+
+/**
+ * A SOAPEncoder is used to create SOAP 1.1 formatted requests for a web service
+ * operation. A WSDLOperation provides the definition of how SOAP request should
+ * be formatted and thus must be set before a call is made to encode().
+ *
+ * TODO: Create a SOAP 1.2 specific subclass of this encoder.
+ *
+ * @private
+ */
+public class SOAPEncoder extends XMLEncoder implements ISOAPEncoder
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public function SOAPEncoder()
+    {
+        super();
+        log = Log.getLogger("mx.rpc.soap.SOAPEncoder");
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var resourceManager:IResourceManager =
+									ResourceManager.getInstance();
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Determines whether the encoder should ignore whitespace when
+     * constructing an XML representation of a SOAP request.
+     * The default is true and thus whitespace is not preserved.
+     * If an XML Schema type definition specifies a whiteSpace
+     * restriction set to preserve then ignoreWhitespace must
+     * first be set to false. Conversely, if a type whiteSpace
+     * restriction is set to replace or collapse then
+     * that setting will be honored even if ignoreWhitespace is set to false.
+     */
+    public function get ignoreWhitespace():Boolean
+    {
+        return _ignoreWhitespace;
+    }
+
+    public function set ignoreWhitespace(value:Boolean):void
+    {
+        _ignoreWhitespace = value;
+    }
+
+    /**
+     * @private
+     */
+    protected function get inputEncoding():WSDLEncoding
+    {
+        return _wsdlOperation.inputMessage.encoding;
+    }
+
+    public function get schemaConstants():SchemaConstants
+    {
+        return schemaManager.schemaConstants;
+    }
+
+    public function get soapConstants():SOAPConstants
+    {
+        return wsdlOperation.soapConstants;
+    }
+
+    public function get wsdlOperation():WSDLOperation
+    {
+        return _wsdlOperation;
+    }
+
+    public function set wsdlOperation(value:WSDLOperation):void
+    {
+        _wsdlOperation = value;
+        schemaManager = _wsdlOperation.schemaManager;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Creates a SOAP encodes request to an operation from the given input
+     * parameters and headers.
+     */
+    public function encodeRequest(args:* = null, headers:Array = null):XML
+    {
+        // FIXME: Some level of validation should occur here
+        // to check we're ready to start encoding.
+
+        reset();
+
+        var envelopeXML:XML;
+
+        // Keep track of the previous ignoreWhitespace setting (as it is
+        // unfortunately a static API on the intrinsic XML type) so we
+        // can set it back to its original state once we're finished.
+        var oldIgnoreWhitespace:Boolean = XML.ignoreWhitespace;
+        var oldPrettyPrinting:Boolean = XML.prettyPrinting;
+        try
+        {
+            XML.ignoreWhitespace = ignoreWhitespace;
+            XML.prettyPrinting = false;
+            envelopeXML = encodeEnvelope(args, headers);
+        }
+        finally
+        {
+            XML.ignoreWhitespace = oldIgnoreWhitespace;
+            XML.prettyPrinting = oldPrettyPrinting;
+        }
+
+        return envelopeXML;
+    }
+
+    /**
+     * A SOAP Envelope element is the root element of a SOAP message. It
+     * must specify the SOAP namespace.
+     */
+    protected function encodeEnvelope(args:*, headers:Array):XML
+    {
+        log.debug("Encoding SOAP request envelope");
+
+        var envelopeXML:XML = <{soapConstants.envelopeQName.localName}/>;
+        envelopeXML.setNamespace(soapConstants.envelopeNamespace);
+        envelopeXML.addNamespace(schemaConstants.xsdNamespace);
+        envelopeXML.addNamespace(schemaConstants.xsiNamespace);
+
+        // Make sure the envelope namespace is registered with the schemaManager
+        // so that its prefix can be looked up when encoding header attributes.
+        schemaManager.namespaces[soapConstants.envelopeNamespace.prefix] =
+                soapConstants.envelopeNamespace;
+
+        encodeHeaders(headers, envelopeXML);
+        encodeBody(args, envelopeXML);
+        return envelopeXML;
+    }
+
+    /**
+     * Appends SOAP Header to the SOAP Envelope
+     */
+    protected function encodeHeaders(headers:Array, envelopeXML:XML):void
+    {
+        if (headers != null)
+        {
+            var count:uint = headers.length;
+            if (count > 0)
+            {
+                var headersXML:XML = <{soapConstants.headerQName.localName}/>
+                headersXML.setNamespace(soapConstants.envelopeNamespace);
+                envelopeXML.appendChild(headersXML);
+
+                for (var i:uint = 0; i < count; i++)
+                {
+                    encodeHeaderElement(headers[i], headersXML);
+                }
+            }
+        }
+    }
+
+    /**
+     * Appends a header element to top SOAP Header tag
+     */
+    protected function encodeHeaderElement(header:Object, headersXML:XML):void
+    {
+        var preEncodedNode:* = preEncodedCheck(header);
+        if (preEncodedNode != null)
+        {
+            headersXML.appendChild(header);
+        }
+        else
+        {
+            var headerElement:XMLList = new XMLList();
+
+            // header value might contain a mapping
+            if (header.content != null && header.content.hasOwnProperty(header.qname.localName))
+            {
+                header.content = header.content[header.qname.localName];
+            }
+
+            // check the content of the header for pre-encoded values
+            preEncodedNode = preEncodedCheck(header.content);
+            if (preEncodedNode != null)
+            {
+                // We can't set namespaces or attributes on XMLList, so we
+                // just append it and return...
+                if (preEncodedNode is XMLList)
+                {
+                    headerElement = preEncodedNode as XMLList;
+                }
+                else
+                {
+                    headerElement = new XMLList(preEncodedNode);
+                }
+            }
+            else
+            {
+                // If not pre-encoded, we encode the header value. If there is a
+                // definition in the schema for this header QName, we will use it,
+                // otherwise encode with anyType. This is handled by XMLEncoder.
+                headerElement = encode(header.content, header.qname);
+            }
+
+
+            // Typically headerElement will be an XMLList of length 1, but we
+            // loop through it anyway, in case we were given a pre-encoded XMLList,
+            // or an array value for the header.content
+            for each (var headerElementNode:XML in headerElement)
+            {
+
+                // add namespace to the header, if not already set by encoding.
+                if (header.qname.uri != null && header.qname.uri.length > 0
+                    && headerElementNode.namespace().uri != header.qname.uri)
+                {
+                    var prefix:String = schemaManager.getOrCreatePrefix(header.qname.uri);
+                    var ns:Namespace = new Namespace(prefix, header.qname.uri);
+                    headerElementNode.setNamespace(ns);
+                }
+
+                // add header attributes
+                var attrStr:String;
+                if (header.mustUnderstand)
+                {
+                    attrStr = schemaManager.getOrCreatePrefix(soapConstants.mustUnderstandQName.uri);
+                    headerElementNode.@[attrStr + ":" + soapConstants.mustUnderstandQName.localName] = "1"; // Use "1" form for WS-I compatibility
+                }
+
+                if (header.role != null)
+                {
+                    attrStr = schemaManager.getOrCreatePrefix(soapConstants.actorQName.uri);
+                    headerElementNode.@[attrStr + ":" + soapConstants.actorQName.localName] = header.role;
+                }
+            }
+
+            // finally, add header list to SOAP Header node
+            headersXML.appendChild(headerElement);
+        }
+    }
+
+    /**
+     * Encodes the SOAP Body. Currently assumes only one operation sub-element.
+     */
+    protected function encodeBody(inputParams:*, envelopeXML:XML):void
+    {
+        log.debug("Encoding SOAP request body");
+
+        // Create SOAP Body element
+        var bodyXML:XML = <{soapConstants.bodyQName.localName}/>;
+        bodyXML.setNamespace(soapConstants.envelopeNamespace);
+
+        // FIXME: Should we continue to support pre-encoded XML fragments here?
+        // How would we tell the difference between an XML type input and
+        // a pre-encoded message?
+
+        // Special case handling for input params that are pre-encoded SOAP
+        // body contents.
+        var preEncoded:Object = preEncodedCheck(inputParams);
+        if (preEncoded != null)
+        {
+            bodyXML.appendChild(preEncoded);
+        }
+        else
+        {
+            // Encode the operation and append it to the body.
+            if (wsdlOperation.style == SOAPConstants.DOC_STYLE)
+            {
+                if (inputEncoding.useStyle == SOAPConstants.USE_LITERAL)
+                {
+                    encodeOperationAsDocumentLiteral(inputParams, bodyXML);
+                }
+                else
+                {
+                    //Note: document-encoded not support by WSDL 1.1
+                    throw new Error("WSDL 1.1 supports operations with binding style 'document' only if use style is 'literal'.");
+                }
+            }
+            else if (wsdlOperation.style == SOAPConstants.RPC_STYLE)
+            {
+               if (inputEncoding.useStyle == SOAPConstants.USE_LITERAL)
+               {
+                    encodeOperationAsRPCLiteral(inputParams, bodyXML);
+               }
+               else if (inputEncoding.useStyle == SOAPConstants.USE_ENCODED)
+               {
+                   encodeOperationAsRPCEncoded(inputParams, bodyXML);
+               }
+               else
+               {
+                   throw new Error("WSDL 1.1 does not support operations with binding style 'rpc' and use style " + inputEncoding.useStyle + ".");
+               }
+            }
+            else
+            {
+                throw new Error("Unrecognized binding style '" + wsdlOperation.style + "'. Only 'document' and 'rpc' styles are supported.");
+            }
+        }
+
+        // Add the fully encoded body to the envelope.
+        envelopeXML.appendChild(bodyXML);
+    }
+
+    /**
+     * Encodes a WSDL operation using document literal format.
+     * There's no need to generate an operation element so advance directly
+     * to encoding the message.
+     *

+     * From the WSDL 1.1 specification:
+     *

+     *

+     * "If use is literal, then each part references
+     * a concrete schema definition using either the element or
+     * type attribute. In the first case, the element referenced
+     * by the part will appear directly under the Body element (for document
+     * style bindings)... In the second, the type referenced by the part
+     * becomes the schema type of the enclosing element (Body for document
+     * style...)."
+     *

+     */
+    protected function encodeOperationAsDocumentLiteral(inputParams:Object, bodyXML:XML):void
+    {
+        var parts:Array = wsdlOperation.inputMessage.parts;
+        if (wsdlOperation.inputMessage.isWrapped)
+        {
+            // Wrapped-style uses a single part element as the outer wrapper.
+            var wrappedQName:QName = wsdlOperation.inputMessage.wrappedQName;
+            var operationXML:XML = <{wrappedQName.localName}/>;
+            if (wrappedQName.uri != null && wrappedQName.uri != "")
+            {
+                var prefix:String = schemaManager.getOrCreatePrefix(wrappedQName.uri);
+                var inputNamespace:Namespace = new Namespace(prefix, wrappedQName.uri);
+                operationXML.setNamespace(inputNamespace);
+            }
+
+            encodeMessage(inputParams, operationXML);
+            bodyXML.appendChild(operationXML);
+        }
+        else
+        {
+            // Non-wrapped document-literal style directly encodes the parts
+            // as children of the SOAP Body.
+            encodeMessage(inputParams, bodyXML);
+        }
+    }
+
+    /**
+     * Encodes a WSDL operation using RPC literal format.
+     *

+     * From the WSDL 1.1 specification:
+     *

+     *

+     * "If the operation style is rpc each part is a parameter
+     * or a return value and appears inside a wrapper element within the body
+     * (following Section 7.1 of the SOAP specification). The wrapper element
+     * is named identically to the operation name and its namespace is the
+     * value of the namespace attribute. Each message part (parameter) appears
+     * under the wrapper, represented by an accessor named identically to the
+     * corresponding parameter of the call. Parts are arranged in the same
+     * order as the parameters of the call."
+     *

+     *

+     * "If use is literal, then each part references
+     * a concrete schema definition using either the element or
+     * type attribute. In the first case, the element referenced
+     * by the part will appear ... under an accessor element named after the
+     * message part (in rpc style). In the second, the type referenced by the
+     * part becomes the schema type of the enclosing element ( ... part accessor
+     * element for rpc style)."
+     *

+     */
+    protected function encodeOperationAsRPCLiteral(inputParams:Object, bodyXML:XML):void
+    {
+        var operationXML:XML = <{wsdlOperation.name}/>;
+        var prefix:String = schemaManager.getOrCreatePrefix(inputEncoding.namespaceURI);
+        var ns:Namespace = new Namespace(prefix, inputEncoding.namespaceURI);
+        operationXML.setNamespace(ns);
+
+        encodeMessage(inputParams, operationXML);
+
+        bodyXML.appendChild(operationXML);
+    }
+
+    /**
+     * Encodes a WSDL message part using RPC encoded format.
+     *

+     * From the WSDL 1.1 specification:
+     *

+     *

+     * "If the operation style is rpc each part is a parameter
+     * or a return value and appears inside a wrapper element within the body
+     * (following Section 7.1 of the SOAP specification). The wrapper element
+     * is named identically to the operation name and its namespace is the
+     * value of the namespace attribute. Each message part (parameter) appears
+     * under the wrapper, represented by an accessor named identically to the
+     * corresponding parameter of the call. Parts are arranged in the same
+     * order as the parameters of the call."
+     *

+     *

+     * "If use is encoded, then each message part
+     * references an abstract type using the type attribute. These
+     * abstract types are used to produce a concrete message by applying an
+     * encoding specified by the encodingStyle attribute. The part
+     * names, types and value of the namespace attribute are all inputs to the
+     * encoding, although the namespace attribute only applies to content not
+     * explicitly defined by the abstract types. If the referenced encoding
+     * style allows variations in it's format (such as the SOAP encoding does),
+     * then all variations MUST be supported ("reader makes right")."
+     *

+     */
+    protected function encodeOperationAsRPCEncoded(inputParams:*, bodyXML:XML):void
+    {
+        isSOAPEncoding = true;
+        var operationXML:XML = <{wsdlOperation.name}/>;
+        var inputNamespaceURI:String = inputEncoding.namespaceURI;
+        var inputPrefix:String = schemaManager.getOrCreatePrefix(inputNamespaceURI);
+        var inputNamespace:Namespace = new Namespace(inputPrefix, inputNamespaceURI);
+        operationXML.setNamespace(inputNamespace);
+
+        encodeMessage(inputParams, operationXML);
+
+        bodyXML.appendChild(operationXML);
+        bodyXML.@[SOAPConstants.SOAP_ENV_PREFIX + ":encodingStyle"] = soapConstants.encodingURI;
+    }
+
+    /**
+     * Encodes an input message for a WSDL operation. The provided input
+     * parameters are validated against the required message parts.
+     */
+    protected function encodeMessage(inputParams:*, operationXML:XML):void
+    {
+        var parts:Array;
+        if (wsdlOperation.inputMessage != null)
+            parts = wsdlOperation.inputMessage.parts;
+
+        if (parts == null)
+            return;
+
+        // Keep track of part names for validation
+        var partNames:Object = {};
+
+        // Keep track of any optional parts that were not provided
+        var optionalOmitted:int = 0;
+
+		var message:String;
+
+        // Match the input parameters to WSDL message parts
+        for (var i:uint = 0; i < parts.length; i++)
+        {
+            var part:WSDLMessagePart = parts[i];
+            var value:* = undefined;
+
+            // Ordered Parameters
+            if (inputParams is Array)
+            {
+                value = inputParams[i];
+                if (value === undefined)
+                {
+                    if (part.optional)
+					{
+                        optionalOmitted++;
+					}
+                    else
+					{
+						message = resourceManager.getString(
+							"rpc", "missingInputParameter", [ i ]);
+                        throw new Error(message);
+					}
+                }
+            }
+            // Named Parameters
+            else
+            {
+                var name:String = part.name.localName;
+                if (inputParams != null)
+                    value = inputParams[name];
+                partNames[name] = value;
+
+                if (value === undefined || (inputParams != null && !inputParams.hasOwnProperty(name)))
+                {
+                    if (part.optional)
+					{
+                        optionalOmitted++;
+					}
+                    else
+					{
+						message = resourceManager.getString(
+							"rpc", "missingInputParameterWithName", [ name ])
+                        throw new Error(message);
+					}
+                }
+            }
+
+            if (value !== undefined)
+            {
+                // Finally, encode the value for the WSDL message part
+                var partXMLList:XMLList = encodePartValue(part, value);
+                operationXML.appendChild(partXMLList);
+            }
+        }
+
+        // Check for any unexpected parameters
+        if (inputParams != null)
+        {
+            if (inputParams is Array)
+            {
+                if (inputParams.length < (parts.length - optionalOmitted))
+                {
+					message = resourceManager.getString(
+						"rpc", "tooFewInputParameters",
+						[ parts.length, inputParams.length ]);
+                    throw new Error(message);
+                }
+            }
+            else
+            {
+                for (var inName:String in inputParams)
+                {
+                    if (!partNames.hasOwnProperty(inName))
+                    {
+						message = resourceManager.getString(
+							"rpc", "unexpectedInputParameter", [ inName ]);
+                        throw new Error(message);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * A WSDL message part may either refer to an XML Schema type (that is, a
+     * <complexType> or <simpleType>) directly by QName or to an element
+     * definition by QName depending on the SOAP use and encodingStyle
+     * attributes.
+     */
+    protected function encodePartValue(part:WSDLMessagePart, value:*):XMLList
+    {
+        var partXMLList:XMLList;
+
+        if (part.element != null)
+        {
+            partXMLList = encode(value, part.element);
+        }
+        else
+        {
+            partXMLList = encode(value, part.name, part.type, part.definition);
+        }
+
+        return partXMLList;
+    }
+
+    /**
+     * Looks to see whether a pre-encoded SOAP request has been passed to the
+     * encoder.
+     */
+    protected function preEncodedCheck(value:*):Object
+    {
+        var preEncodedNode:Object = null;
+        if (value != null)
+        {
+            if (value is XMLList)
+            {
+                preEncodedNode = value as XMLList;
+            }
+            else if (value is XML)
+            {
+                preEncodedNode = value as XML;
+            }
+            else if (value is XMLDocument)
+            {
+                var xmlDocument:XMLDocument = value as XMLDocument;
+                preEncodedNode = new XML(xmlDocument.firstChild.toString());
+            }
+            else if (value is XMLNode)
+            {
+                var xmlNode:XMLNode = value as XMLNode;
+                preEncodedNode = new XML(xmlNode.toString());
+            }
+        }
+        return preEncodedNode;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Custom XML Encoding Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * SOAP specific override to handle special wrapped-style document-literal
+     * parameters which can specify minOccurs and maxOccurs attributes on
+     * local element definitions that are, for all intents and purposes,
+     * really top-level element definitions representing operation parts.
+     * XML Schema does not normally allow minOccurs or maxOccurs on top-level
+     * element definitions and the SchemaProcessor is not looking out for them
+     * so we have to special case this situation here.
+     */
+    override public function encode(value:*, name:QName = null, type:QName = null, definition:XML = null):XMLList
+    {
+        if (definition != null)
+        {
+            var result:XMLList = new XMLList();
+
+            // <element minOccurs="..." maxOccurs="..."> occur on a local element
+            // that may act like a top-level element for wrapped-style document
+            // literal.
+            var maxOccurs:uint = getMaxOccurs(definition);
+            var minOccurs:uint = getMinOccurs(definition);
+
+            // If the maximum occurence should 0 this element must not be present.
+            if (maxOccurs == 0)
+                return result;
+
+            // If minOccurs == 0 the element is optional so we can omit it if
+            // a value was not provided.
+            if (value == null && minOccurs == 0)
+                return result;
+
+            if (maxOccurs > 1)
+            {
+                // Create a temporary XML parent to hold the XMLList of values
+                // during encoding ...
+                var content:XMLList = new XMLList();
+                // To make sure we will use the correct namespace if there are more
+                // than one top level schemas, we push the relevant schema as a new scope.
+                var foundScope:Boolean = schemaManager.pushNamespaceInScope(name.uri);
+
+                encodeGroupElement(definition, content, name, value);
+
+                if (foundScope)
+                    schemaManager.releaseScope();
+
+                result += content;
+                return result;
+            }
+        }
+
+        return super.encode(value, name, type, definition);
+    }
+
+    /**
+     * SOAP specific override to intercept SOAP encoded types such as base64.
+     * Also, SOAP encoding requires an XSI type attribute to be specified on
+     * encoded types.
+     *
+     * @private
+     */
+    override public function encodeType(type:QName, parent:XML, name:QName, value:*, restriction:XML = null):void
+    {
+        var datatypes:SchemaDatatypes = schemaManager.schemaDatatypes;
+
+        // Allow instance level overrides for the type (which can also be used
+        // to specify the XSI type too).
+        var xsiType:QName = getXSIType(value);
+        if (xsiType != null)
+            type = xsiType;
+
+        // We can encode many SOAP types as their XML Schema equivalents so
+        // long as we set the XSI type correctly for SOAP encoded operations
+        if (isSOAPEncoding)
+        {
+            // Keep track of the real type for setting the SOAP encoding
+            // xsi:type as we may need to use a different type internally for
+            // XML Schema encoding...
+            xsiType = type;
+
+            if (SOAPConstants.isSOAPEncodedType(type))
+            {
+                // We treat SOAP encoded base64 as the XML Schema base64Binary
+                if (type == soapConstants.soapBase64QName)
+                {
+                    type = datatypes.base64BinaryQName;
+                }
+                else
+                {
+                    // HACK: Translate simple SOAP encoded types to XSD types
+                    // for the purposes of schema type marshalling
+                    var localName:String = type.localName;
+                    if (localName != "Array" && localName != "arrayType")
+                    {
+                        type = schemaConstants.getQName(localName);
+                    }
+                }
+            }
+        }
+
+        // Look for custom handlers to override processing of SOAP types.
+        var customType:ICustomSOAPType = SOAPConstants.getCustomSOAPType(type);
+        if (customType != null)
+        {
+            customType.encode(this, parent, name, value, restriction);
+        }
+        else
+        {
+            super.encodeType(type, parent, name, value, restriction);
+        }
+
+        // Finally, we may need to set an xsi:type attribute on the parent...
+        if (xsiType != null)
+        {
+//            var parentNode:XML = parent as XML;
+
+            // ... but we don't override if an existing xsi:type was determined
+            // up stream (ie.. for anyType and anySimpleType).
+            var xsiTypeAttr:String = parent.@[schemaConstants.getXSIToken(schemaConstants.typeAttrQName)]
+            if (xsiTypeAttr == null || xsiTypeAttr == "")
+            {
+                // FIXME: we shouldn't need super anymore since deriveXSIType is separate
+                super.setXSIType(parent, xsiType);
+            }
+        }
+    }
+
+    /**
+     * This override intercepts encoding a complexType with complexContent based
+     * on a SOAP encoded Array. This awkward approach to Array type definitions
+     * was popular in WSDL 1.1 rpc-encoded operations and is a special case that
+     * needs to be handled, but note it violates the WS-I Basic Profile 1.0.
+     *
+     * @private
+     */
+    override public function encodeComplexRestriction(restriction:XML, parent:XML, name:QName, value:*):void
+    {
+        // Handle for <restriction base="soap-enc:Array"> as a special case
+        var schemaConstants:SchemaConstants = schemaManager.schemaConstants;
+        var baseName:String = restriction.@base;
+        var baseQName:QName = schemaManager.getQNameForPrefixedName(baseName, restriction);
+        if (baseQName == soapConstants.soapencArrayQName)
+        {
+            var customType:ICustomSOAPType = SOAPConstants.getCustomSOAPType(baseQName);
+            if (customType != null)
+            {
+                customType.encode(this, parent, name, value, restriction);
+                return;
+            }
+        }
+
+        super.encodeComplexRestriction(restriction, parent, name, value);
+    }
+
+    /**
+     * This override tries to determine the XSI type for the encoded value if
+     * SOAP use style is set to encoded.
+     *
+     * @private
+     */
+    protected override function deriveXSIType(parent:XML, type:QName, value:*):void
+    {
+
+        // Add XSI type if the SOAP message has use style as "encoded"
+        if (isSOAPEncoding)
+        {
+            var datatypes:SchemaDatatypes = schemaManager.schemaDatatypes;
+            var soapType:QName;
+
+            // HACK: For anyType and anySimpleType, try to guess the schema
+            // type for simple values (note we can't guess for complex values).
+            if (type == datatypes.anyTypeQName || type == datatypes.anySimpleTypeQName)
+            {
+                if (isSimpleValue(value) || type == datatypes.anySimpleTypeQName)
+                {
+                    var localName:String = SchemaMarshaller.guessSimpleType(value);
+                    soapType = new QName(schemaConstants.xsdURI, localName);
+                }
+            }
+            else
+            {
+                soapType = type;
+            }
+
+            if (soapType != null)
+            {
+                // FIXME: should be OK to use setXSIType
+//                setXSIType(parent, soapType);
+                parent.@[schemaConstants.getXSIToken(schemaConstants.typeAttrQName)] = schemaConstants.getXSDToken(soapType);
+            }
+        }
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    private var _ignoreWhitespace:Boolean = true;
+    private var isSOAPEncoding:Boolean = false;
+    private var log:ILogger;
+    private var _wsdlOperation:WSDLOperation;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

Modified Paths:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/rpc/wsdl/WSDLMessage.as
+++ frameworks/projects/rpc/src/mx/rpc/wsdl/WSDLMessage.as
@@ -40,17 +40,32 @@

     /**
      * The SOAP encoding extensions for this message.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public var encoding:WSDLEncoding;

     /**
      * Whether this message is using .NET wrapped style for document literal
      * requests.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public var isWrapped:Boolean;

     /**
      * The unique name of this message.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public var name:String;

@@ -58,12 +73,22 @@
      * An Array of message parts which describe the parameters of this
      * message and the order in which they were specified. By default each of
      * these parameters appear in a SOAP Envelope's Body section.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public var parts:Array;

     /**
      * The QName of the element wrapper if the message is to be encoded using
      * .NET document-literal wrapped style.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public var wrappedQName:QName;

@@ -78,6 +103,11 @@
      * Add a part to this message. The parts Array tracks the order in which
      * parts were added; an internal map allows a part to be located by name.
      * @see #getPart(String)
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function addPart(part:WSDLMessagePart):void
     {
@@ -93,6 +123,11 @@

     /**
      * Locates a message part by name.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function getPart(name:String):WSDLMessagePart
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

--- frameworks/projects/rpc/src/mx/rpc/xml/ContentProxy.as
+++ frameworks/projects/rpc/src/mx/rpc/xml/ContentProxy.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006-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.xml
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18066
Author:   klin@adobe.com
Date:     2010-10-07T17:07:52.957013Z

Log Message:
-----------
Fix ensureCellIsVisible() and arrow key navigation to take into account columns with column.visible=false. The ensureCellIsVisible() method now checks to see if either the specified column is column.visible=true or if no column is specified, if any of the columns are visible=true.

QE notes: No
Doc notes: No
Bugs: SDK-28106
Reviewer: Hans
Tests run: cyclone server
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/components/Grid.as
+++ frameworks/projects/spark/src/spark/components/Grid.as
@@ -2781,15 +2781,23 @@
     {
         const columns:IList = this.columns;

-        if (!columns || columnIndex < -1 || columnIndex >= columns.length)
+        if (!columns || columnIndex < -1 || columnIndex >= columns.length ||
+            !dataProvider || rowIndex < 0 || rowIndex >= dataProvider.length)
             return;

-        if (!dataProvider || rowIndex < 0 || rowIndex >= dataProvider.length)
+        const columnsLength:int = columns.length;
+
+        // Make sure either all columns or the specified column is visible.
+        if (columnIndex == -1)
+            columnIndex = getNextVisibleColumnIndex(-1);
+
+        var columnIsVisible:Boolean = (columnIndex != -1) && (GridColumn(columns.getItemAt(columnIndex)).visible);
+        if (!columnIsVisible)
             return;
-
+
         // A cell's index as defined by LayoutBase it's just its position
         // in the row-major linear ordering of the grid's cells.
-        const elementIndex:int = (rowIndex * columns.length) + ((columnIndex < 0) ? 0 : columnIndex);
+        const elementIndex:int = (rowIndex * columnsLength) + columnIndex;
         const scrollHorizontally:Boolean = columnIndex != -1;

         // Iterate until we've scrolled elementIndex at least partially into view.
@@ -3146,7 +3154,7 @@
                 caretColumnIndex =  _columns.length - 1;
             dispatchCaretChangeEvent();
             caretChanged = false;
-    }
+        }
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 18548
Author:   rfrishbe@adobe.com
Date:     2010-11-11T22:05:22.380108Z

Log Message:
-----------
Just fixing up some ASDocs around touchDelay.

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

Modified Paths:
--------------
<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/SkinnableContainer.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/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -252,20 +252,10 @@
 [Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]

 /**
- *  When in touch interaction mode, the number of milliseconds to wait before showing the
- *  component in a visually down state.
- *
- *
The reason for this delay is because when a user initiates a scroll gesture, we don't want
- *  components to flicker as they touch the screen.  By having a reasonable delay, we make
- *  sure that the user still gets feedback when they press down on a component, but that the
- *  feedback doesn't come too quickly that it gets displayed during a scroll gesture
- *  operation.

- *
- *
If the mobile theme is applied, the default value for this style is 100 ms for
- *  components inside of a Scroller and 0 ms for components outside of a Scroller.

+ *  @copy spark.components.supportClasses.GroupBase#style:touchDelay
  *
  *  @langversion 3.0
- *  @playerversion Flash 10
+ *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */


Transferred from the Adobe Open Source Subversion Repository

Revision: 20209
Author:   smgilson@adobe.com
Date:     2011-02-08T21:50:28.100534Z

Log Message:
-----------
Missed this file as part of FLEXDOCS-1323
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/List.as

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -567,7 +567,7 @@
      *
      *  @default false
      *
-     *  @langversion 4.0
+     *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
@@ -2718,24 +2718,24 @@
         // be an editable input control.
         if (isEditableTarget(event.target))
             return;
-
-		var touchMode:Boolean = (getStyle("interactionMode") == InteractionMode.TOUCH);
+
+        var touchMode:Boolean = (getStyle("interactionMode") == InteractionMode.TOUCH);

         // 1. Was the space bar hit? or was the enter key hit and we're in 5-way mode
         // Hitting the space bar means the current caret item,
         // that is the item currently in focus, is being
         // selected or de-selected.
         if (event.keyCode == Keyboard.SPACE ||
-			(touchMode && event.keyCode == Keyboard.ENTER))
-        {
-			if (allowMultipleSelection)
+            (touchMode && event.keyCode == Keyboard.ENTER))
+        {
+            if (allowMultipleSelection)
             {
                 // Need to set "changeCaret" to false below so that we
                 // don't change the caret to an item in the selectedIndices
                 // if we are currently deselecting an item
-				setSelectedIndices(calculateSelectedIndices(caretIndex, event.shiftKey, event.ctrlKey), true, false);
-            }
-			else
+                setSelectedIndices(calculateSelectedIndices(caretIndex, event.shiftKey, event.ctrlKey), true, false);
+            }
+            else
             {
                 // check to see if we're de-selecting the current item
                 if (caretIndex == selectedIndex && (event.ctrlKey || touchMode))
@@ -2748,7 +2748,7 @@
                     // select the current item
                     setSelectedIndex(caretIndex, true, false);
                 }
-
+
             }
             event.preventDefault();
             return;


Transferred from the Adobe Open Source Subversion Repository

Revision: 3220
Author:   smgilson@adobe.com
Date:     2008-09-16T13:04:06.258509Z

Log Message:
-----------
Clean up some ASDoc comments to remove the '&' character

Checkin Test Passed: Yes
QA: No
Bug:
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemFDO.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/intf/ILayoutItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TransformUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemUIC.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/Path.as
+++ frameworks/projects/spark/src/spark/primitives/Path.as
@@ -348,7 +348,7 @@
      */
     public function set winding(value:String):void
     {
-		_winding = value;
+        _winding = value;
     }

     public function get winding():String
@@ -384,18 +384,18 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  @inheritDoc
-	 */
+    /**
+     *  @inheritDoc
+     */
     override protected function skipMeasure():Boolean
     {
         // Don't measure when bounds are up to date.
         return _bounds != null;
     }

-	/**
-	 *  @inheritDoc
-	 */
+    /**
+     *  @inheritDoc
+     */
     override protected function measure():void
     {
         var bounds:Rectangle = getBounds();
@@ -457,19 +457,19 @@
     }

     override protected function endDraw(g:Graphics):void
-	{
-		// Set a transparent line style because filled, unclosed shapes will
-		// automatically be closed by the Player. When they are, we want the line
-		// to be invisible.
-		g.lineStyle(0,0,0);
-		super.endDraw(g);
-	}
+    {
+        // Set a transparent line style because filled, unclosed shapes will
+        // automatically be closed by the Player. When they are, we want the line
+        // to be invisible.
+        g.lineStyle(0,0,0);
+        super.endDraw(g);
+    }

     // TODO!!! For now we create a DO. Once we figure out how to apply transforms
     // to each of the path segments, we can remove this.
     override public function get needsDisplayObject():Boolean
     {
-    	return true;
+        return true;
     }

     //--------------------------------------------------------------------------
@@ -496,7 +496,7 @@

     private function clearBounds():void
     {
-    	_bounds = null;
+        _bounds = null;
     }

     //--------------------------------------------------------------------------
@@ -517,9 +517,9 @@
                                            rotation, transformX, transformY);
     }

- 	//----------------------------------
-	//  actualSize
-	//----------------------------------
+    //----------------------------------
+    //  actualSize
+    //----------------------------------

     /**
      *  @inheritDoc
@@ -528,7 +528,7 @@
     {
         // Path always draws at bounds size
         var bounds:Rectangle = getBounds();
-    	return transformSizeForLayout(bounds.width, bounds.height, true /*actualMatrix*/);
+        return transformSizeForLayout(bounds.width, bounds.height, true /*actualMatrix*/);
     }

     /**
@@ -538,7 +538,7 @@
      *  If one of the desired TBounds dimensions is left unspecified, it's size
      *  will be picked such that item can be optimally sized to fit the other
      *  TBounds dimension. This is useful when the layout doesn't want to
-     *  overconstrain the item in cases where the item TBounds width & height
+     *  overconstrain the item in cases where the item TBounds width and height
      *  are dependent (text, components with complex transforms, etc.)
      *
      *  If both TBounds dimensions are left unspecified, the item will have its
@@ -575,7 +575,7 @@

         // Actual size is always the bounds size
         var oldWidth:Number = _width;
-	    var oldHeight:Number = _height;
+        var oldHeight:Number = _height;
         _width = bw;
         _height = bh;
         dispatchPropertyChangeEvent("width", oldWidth, _width);
@@ -591,7 +591,7 @@
         if (!stroke)
         {
             _scaleX = w / bw;
-            _scaleY = h / bh;
+            _scaleY = h / bh;
         }
         else if (stroke.weight == 0 )
         {
@@ -600,75 +600,75 @@
         }
         else if(stroke.scaleMode != LineScaleMode.NORMAL)
         {
-        	var strokeWeight:Number = stroke.weight;
-        	if (stroke.scaleMode == LineScaleMode.HORIZONTAL)
-        	{
-        		_scaleX = w / (bw + strokeWeight);
+            var strokeWeight:Number = stroke.weight;
+            if (stroke.scaleMode == LineScaleMode.HORIZONTAL)
+            {
+                _scaleX = w / (bw + strokeWeight);
                 _scaleY = (h - strokeWeight) / bh;
-        	}
-        	else if(stroke.scaleMode == LineScaleMode.VERTICAL)
-        	{
+            }
+            else if(stroke.scaleMode == LineScaleMode.VERTICAL)
+            {
                 _scaleX = (w - strokeWeight) / bw;
-                _scaleY = h / (bh + strokeWeight);
-        	}
-        	else // LineScaleMode.NONE
-        	{
-        		_scaleX = (w - strokeWeight) / bw;
-        		_scaleY = (h - strokeWeight) / bh;
-        	}
+                _scaleY = h / (bh + strokeWeight);
+            }
+            else // LineScaleMode.NONE
+            {
+                _scaleX = (w - strokeWeight) / bw;
+                _scaleY = (h - strokeWeight) / bh;
+            }
         }
         else
         {
-	        var t:Number = stroke.weight;
-	        t = t * t / 2;
-	        var t1:Number = t / ( bw * bw);
-
-	        // TODO EGeorige: the following equations don't
-	        // account for skew components of the matrix.
-	        // Also, this can be greatly optimized.
-
-	        // (1) w = bw * x + sqrt( x^2 * t + y^2 * t)
-	        // (2) h = bh * y + sqrt( x^2 * t + y^2 * t)
-	        // (1) - (2):
-	        // w - h = bw * x - bh * y
-	        // x = ( w - h + bh * y ) / bw
-	        // substitute back in (2):
-	        // h - bh * y = sqrt( (w - h + bh * y )^2 * t / bw^2 + y^2 * t )
-	        // h^2 - 2*h*bh*y +bh^2 * y^2 = ((w - h)^2 + 2 * (w-h) * bh * y + bh^2 * y^2 ) * t / bw^2 + y^2 * t
-	        // bh^2 * y^2 - 2*h*bh*y  + h ^2 = t1 * (w - h)^2 + 2 * t1 * (w-h) * bh * y + t1 * bh^2 * y^2 + t * y^2
-	        // bh^2 * y^2 - 2*h*bh*y  + h^2 = t1*(w-h)^2 + 2*t1*(w-h)*bh* y + (t1*bh^2 + t)*y^2
-	        // (bh^2 - t1*bh^2 - t) * y^2 -(2*h*bh +2*t1*(w-h)*bh) * y + (h^2 - t1*(w-h)^2) = 0
-
-	        if( bw != 0 && bh != 0)
-	        {
-	            var A:Number = bh * bh - t1 * bh * bh - t;
-	            var B:Number = -2 *h * bh - 2 * t1 * (w-h) * bh;
-	            var C:Number = h * h - t1 * (w-h) * (w-h);
-
-	            var D:Number = B * B - 4 * A * C;
-	            if (D >= 0)
-	            {
-	                var y1:Number = (-B + Math.sqrt(D)) / (2 * A);
-	                var y2:Number = (-B - Math.sqrt(D)) / (2 * A);
-
-	                var x1:Number = ( w - h + bh * y1 ) / bw;
-	                var x2:Number = ( w - h + bh * y2 ) / bw;
-
-	                if (Math.abs(h - bh * y1 - Math.sqrt(x1 * x1 * t + y1 * y1 * t)) < 0.5 &&
-	                    Math.abs(w - bw * x1 - Math.sqrt(x1 * x1 * t + y1 * y1 * t)) < 0.5)
-	                {
-	                    _scaleX = x1;
-	                    _scaleY = y1;
-	                }
-	                else
-	                if (Math.abs(h - bh * y2 - Math.sqrt(x2 * x2 * t + y2 *y2 * t)) < 0.5 &&
-	                    Math.abs(w - bw * x2 - Math.sqrt(x2 * x2 * t + y2 *y2 * t)) < 0.5)
-	                {
-	                    _scaleX = x2;
-	                    _scaleY = y2;
-	                }
-	            }
-	        }
+            var t:Number = stroke.weight;
+            t = t * t / 2;
+            var t1:Number = t / ( bw * bw);
+
+            // TODO EGeorige: the following equations don't
+            // account for skew components of the matrix.
+            // Also, this can be greatly optimized.
+
+            // (1) w = bw * x + sqrt( x^2 * t + y^2 * t)
+            // (2) h = bh * y + sqrt( x^2 * t + y^2 * t)
+            // (1) - (2):
+            // w - h = bw * x - bh * y
+            // x = ( w - h + bh * y ) / bw
+            // substitute back in (2):
+            // h - bh * y = sqrt( (w - h + bh * y )^2 * t / bw^2 + y^2 * t )
+            // h^2 - 2*h*bh*y +bh^2 * y^2 = ((w - h)^2 + 2 * (w-h) * bh * y + bh^2 * y^2 ) * t / bw^2 + y^2 * t
+            // bh^2 * y^2 - 2*h*bh*y  + h ^2 = t1 * (w - h)^2 + 2 * t1 * (w-h) * bh * y + t1 * bh^2 * y^2 + t * y^2
+            // bh^2 * y^2 - 2*h*bh*y  + h^2 = t1*(w-h)^2 + 2*t1*(w-h)*bh* y + (t1*bh^2 + t)*y^2
+            // (bh^2 - t1*bh^2 - t) * y^2 -(2*h*bh +2*t1*(w-h)*bh) * y + (h^2 - t1*(w-h)^2) = 0
+
+            if( bw != 0 && bh != 0)
+            {
+                var A:Number = bh * bh - t1 * bh * bh - t;
+                var B:Number = -2 *h * bh - 2 * t1 * (w-h) * bh;
+                var C:Number = h * h - t1 * (w-h) * (w-h);
+
+                var D:Number = B * B - 4 * A * C;
+                if (D >= 0)
+                {
+                    var y1:Number = (-B + Math.sqrt(D)) / (2 * A);
+                    var y2:Number = (-B - Math.sqrt(D)) / (2 * A);
+
+                    var x1:Number = ( w - h + bh * y1 ) / bw;
+                    var x2:Number = ( w - h + bh * y2 ) / bw;
+
+                    if (Math.abs(h - bh * y1 - Math.sqrt(x1 * x1 * t + y1 * y1 * t)) < 0.5 &&
+                        Math.abs(w - bw * x1 - Math.sqrt(x1 * x1 * t + y1 * y1 * t)) < 0.5)
+                    {
+                        _scaleX = x1;
+                        _scaleY = y1;
+                    }
+                    else
+                    if (Math.abs(h - bh * y2 - Math.sqrt(x2 * x2 * t + y2 *y2 * t)) < 0.5 &&
+                        Math.abs(w - bw * x2 - Math.sqrt(x2 * x2 * t + y2 *y2 * t)) < 0.5)
+                    {
+                        _scaleX = x2;
+                        _scaleY = y2;
+                    }
+                }
+            }
         }

         if (_scaleX != lastActualScaleX || _scaleY != lastActualScaleY)


try this sizing logic

try this sizing logic

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
@@ -259,7 +259,7 @@
         public function get viewHeight():Number
         {
             // textfields with autosize collapse if no text
-            if (_textField.text == "" && _textField.autoSize != "none")
+            if (_textField.text == "" && autoHeight)
                 return ValuesManager.valuesImpl.getValue(_strand, "fontSize") + 4;

             return _textField.height;
@@ -276,7 +276,7 @@
         public function get viewWidth():Number
         {
             // textfields with autosize collapse if no text
-            if (_textField.text == "" && _textField.autoSize != "none")
+            if (_textField.text == "" && autoWidth)
                 return 0;

             return _textField.width;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6407
Author:   egeorgie@adobe.com
Date:     2009-04-30T03:50:59.993576Z

Log Message:
-----------
Updates to the IGraphicElement interface.
Code generation for FXG text element has been updated.

QE Notes: None
Doc Notes: None
Bugs:
Reviewer: Ely, Pete
tests: checkintests, mustella (components, group, dataGroup, layout)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexTextGraphicNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/InvalidatingSprite.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/ISharedGraphicsDisplayObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/InvalidatingSprite.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/InvalidatingSprite.as
@@ -1,7 +1,7 @@
 package spark.components.supportClasses
 {
 import flash.display.Sprite;
-import spark.primitives.supportClasses.ISharedGraphicsDisplayObject;
+import spark.core.ISharedDisplayObject;

 /**
  *  GraphicElement creates shared DsiplayObject of type
@@ -12,7 +12,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class InvalidatingSprite extends Sprite implements ISharedGraphicsDisplayObject
+public class InvalidatingSprite extends Sprite implements ISharedDisplayObject
 {
     public function InvalidatingSprite()
     {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

Modified Paths:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as
@@ -38,6 +38,12 @@
 /**
  *  The PollingChannel class provides the polling behavior that all polling channels in the messaging
  *  system require.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 public class PollingChannel extends Channel
 {
@@ -59,6 +65,12 @@
 	 *  @param id The id of this Channel.
 	 *
 	 *  @param uri The uri for this Channel.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function PollingChannel(id:String = null, uri:String = null)
     {
@@ -324,6 +336,12 @@
 	 *
 	 *  @throws mx.messaging.errors.InvalidDestinationError If neither the MessageAgent nor the
 	 *                                  message specify a destination.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion BlazeDS 4
+	 *  @productversion LCDS 3
 	 */
 	override public function send(agent:MessageAgent, message:IMessage):void
 	{
@@ -441,6 +459,12 @@
      *  polling the channel will poll the server on behalf of connected MessageAgents.
      *
Invoked automatically based upon subscribing or unsubscribing from a remote
      *  destination over a PollingChannel.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function enablePolling():void
     {
@@ -455,6 +479,12 @@
      *  polling the channel stops polling.
      *
Invoked automatically based upon subscribing or unsubscribing from a remote
      *  destination over a PollingChannel.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function disablePolling():void
     {
@@ -468,6 +498,12 @@
      *  and polling is enabled for this channel.
      *
      *  Note that this method will not start a new poll if one is currently in progress.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function poll():void
     {
@@ -636,6 +672,12 @@

     /**
     * Define the default Polling Interval as 3000ms
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion BlazeDS 4
+    *  @productversion LCDS 3
     */
     private static const DEFAULT_POLLING_INTERVAL:int = 3000;
 }


handling singleton implementation in classInfo

--- WeaveASJS/src/Weave.as
+++ WeaveASJS/src/Weave.as
@@ -586,6 +586,15 @@

 			WeaveAPI.ClassRegistry.registerClass(definition, id, allInterfaces, label);

+			if(singleton)
+			{
+				var theInterface:Class = (info[INTERFACES] || [])[0];
+				if(!theInterface)
+					throw new Error("An interface must be specified to be registered as a singleton implementation");
+				WeaveAPI.ClassRegistry.registerSingletonImplementation(theInterface, definition);
+			}
+
+
 			for each (var deprecatedId:String in deprecatedIds)
 				WeaveAPI.ClassRegistry.registerClass(definition, deprecatedId);


fix missing ;

fix missing ;

--- src/aerys/minko/render/shader/compiler/graph/nodes/leaf/Constant.as
+++ src/aerys/minko/render/shader/compiler/graph/nodes/leaf/Constant.as
@@ -12,7 +12,7 @@
 	 */
 	public class Constant extends AbstractNode
 	{
-		private var _value : Vector.<Number>
+		private var _value : Vector.<Number>;

 		public function get value() : Vector.<Number>
 		{


Fix small bug when setInterval never stops.

--- src/flash/utils/Timer.as
+++ src/flash/utils/Timer.as
@@ -22,6 +22,7 @@
 			}
 			this.m_delay = delay;
 			this.m_repeatCount = repeatCount;
+			this.m_iteration = 0;
 		}

 		public function get delay():Number


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

Modified Paths:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/rpc/xml/ContentProxy.as
+++ frameworks/projects/rpc/src/mx/rpc/xml/ContentProxy.as
@@ -97,6 +97,11 @@
      *  @return The value of the property.
      *  In some instances this value may be an instance of
      *  ObjectProxy.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override flash_proxy function getProperty(name:*):*
     {
@@ -115,6 +120,11 @@
      *  called method.
      *
      *  @return The return value of the called method.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override flash_proxy function callProperty(name:*, ... rest):*
     {
@@ -132,6 +142,11 @@
      *  inspecting the localName property.
      *
      *  @return A Boolean indicating if the property was deleted.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override flash_proxy function deleteProperty(name:*):Boolean
     {
@@ -152,6 +167,11 @@
      *  for existence.
      *
      *  @see flash.utils.Proxy#hasProperty()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override flash_proxy function hasProperty(name:*):Boolean
     {
@@ -170,6 +190,11 @@
      *  should be updated on the proxied object.
      *
      *  @param value Value that should be set on the proxied object.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override flash_proxy function setProperty(name:*, value:*):void
     {
@@ -201,6 +226,11 @@
      *  a subclass of flash.utils.Proxy.
      *
      *  @see flash.utils.Proxy#nextName()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override flash_proxy function nextName(index:int):String
     {
@@ -212,6 +242,11 @@
      *  a subclass of flash.utils.Proxy.
      *
      *  @see flash.utils.Proxy#nextNameIndex()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override flash_proxy function nextNameIndex(index:int):int
     {
@@ -235,6 +270,11 @@
      *  a subclass of flash.utils.Proxy.
      *
      *  @see flash.utils.Proxy#nextValue()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override flash_proxy function nextValue(index:int):*
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18565
Author:   hmuller@adobe.com
Date:     2010-11-12T21:52:04.958402Z

Log Message:
-----------
Ignore DataGrid stretchCursor style values when they're the wrong type (not a Class).

Added GridEvent/grid and GridItemRenderer/grid read-only properties.

Added DataGrid,Grid/invalidateTypicalItem() method.

Change GridColumnHeaderGroupLayout/measure - minimized measuredWidth to eliminate impact on DataGrid measuredWidth

QE notes:
Doc notes:
Bugs: SDK-27776, SDK-28538
Reviewer: Carol
Tests run: checkin
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/GridEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderGroupLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/Grid.as
+++ frameworks/projects/spark/src/spark/components/Grid.as
@@ -2147,12 +2147,32 @@

         _typicalItem = value;

+        invalidateTypicalItem();
+
+        dispatchChangeEvent("typicalItemChanged");
+    }
+
+
+    /**
+     *  Clears cached column width data that had been based on the
+     *  typicalItem and requests a new layout pass.   This method should
+     *  be called if some aspect of the typicalItem has changed that should
+     *  be reflected by the Grid's layout.
+     *
+     *
This method is called automatically if the typicalItem is changed directly, i.e.
+     *  if the property is set to a new value that's not "==" to current value.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function invalidateTypicalItem():void
+    {
         typicalItemChanged = true;
         invalidateProperties();
         invalidateSize();
-        invalidateDisplayList();
-
-        dispatchChangeEvent("typicalItemChanged");
+        invalidateDisplayList();;
     }

     //----------------------------------
@@ -3129,10 +3149,8 @@
     {
         if (!inUpdateDisplayList)
         {
-            const notifyListeners:Boolean = !invalidateSizeFlag;
             super.invalidateSize();
-            if (notifyListeners)
-                dispatchChangeEvent("invalidateSize");
+            dispatchChangeEvent("invalidateSize");
         }
     }

@@ -3149,10 +3167,8 @@
     {
         if (!inUpdateDisplayList)
         {
-            const notifyListeners:Boolean = !invalidateDisplayListFlag;
             super.invalidateDisplayList();
-            if (notifyListeners)
-                dispatchChangeEvent("invalidateDisplayList");
+            dispatchChangeEvent("invalidateDisplayList");
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12185
Author:   clucier@adobe.com
Date:     2009-11-24T20:27:21.849517Z

Log Message:
-----------
Change to List which addresses dueling key interaction when an item renderer is focused and "editable".

QE notes: None
Doc notes: None
Bugs: SDK-22598
Reviewer: Glenn
Tests run: Checkin
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -11,12 +11,14 @@

 package spark.components
 {
-
+
 import flash.display.DisplayObject;
 import flash.events.Event;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
 import flash.geom.Point;
+import flash.system.ApplicationDomain;
+import flash.text.TextField;
 import flash.ui.Keyboard;

 import mx.core.DragSource;
@@ -283,6 +285,16 @@
         super();

         useVirtualLayout = true;
+
+        // If available, get soft reference to the RichEditableText class
+        // to use in keyDownHandler().
+        if (ApplicationDomain.currentDomain.hasDefinition(
+            "spark.components.RichEditableText"))
+        {
+            richEditableTextClass =
+                Class(ApplicationDomain.currentDomain.getDefinition(
+                    "spark.components.RichEditableText"));
+        }
     }

     //--------------------------------------------------------------------------
@@ -324,6 +336,12 @@
      *  @private
      */
     private var pendingSelectionCtrlKey:Boolean;
+
+    /**
+     *  @private
+     *  Soft reference to RichEditableText class object, if available.
+     */
+    private var richEditableTextClass:Class;

     //--------------------------------------------------------------------------
     //
@@ -2239,8 +2257,14 @@
     override protected function keyDownHandler(event:KeyboardEvent):void
     {
         super.keyDownHandler(event);
-
+
         if (!dataProvider || !layout || event.isDefaultPrevented())
+            return;
+
+        // In lue of a formal item editor architecture (pending), we will
+        // defer all keyboard events to the target if the target happens to
+        // be an editable input control.
+        if (isEditableTarget(event.target))
             return;

         // 1. Was the space bar hit?
@@ -2261,6 +2285,7 @@
         // matches the keystroke.
         if (findKey(event.charCode))
         {
+            trace("findkey");
             event.preventDefault();
             return;
         }
@@ -2358,6 +2383,19 @@
             ensureIndexIsVisible(proposedNewIndex);
         }
     }
+
+    /**
+     *  @private
+     *  Helper used to determine if the target of a KeyboardEvent happens to
+     *  be an editable text instance.
+     */
+    protected function isEditableTarget(target:Object):Boolean
+    {
+        var focusObj:Object = getFocus();
+        return ((focusObj is TextField && focusObj.type=="input") ||
+            (richEditableTextClass && focusObj is richEditableTextClass &&
+             focusObj.editable == true))
+    }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3633
Author:   smgilson@adobe.com
Date:     2008-10-14T19:56:42.919445Z

Log Message:
-----------
ASDoc edits

Checkin Test Passed: Yes
QA: No
Bug:
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -20,7 +20,16 @@
 import mx.skins.spark.FxDefaultItemRenderer;

 /**
- *  The List class.
+ *  The FxList control displays a vertical list of items.
+ *  Its functionality is very similar to that of the SELECT
+ *  form element in HTML.
+ *  If there are more items than can be displayed at once, it
+ *  can display a vertical scroll bar so the user can access
+ *  all items in the list.
+ *  An optional horizontal scroll bar lets the user view items
+ *  when the full width of the list items is unlikely to fit.
+ *  The user can select one or more items from the list, depending
+ *  on the value of the allowMultipleSelection property.
  */
 public class FxList extends FxListBase
 {
@@ -56,12 +65,13 @@
     //
     //--------------------------------------------------------------------------

-    /**
-     *  Flag that determines if the list supports multiple selection.
-     *
+    /*
      *  TODO: description of how single selection properties
      *  work when multiple selection is enabled. multiple selection
      *  doesn't support selectionChanging event. etc.
+     */
+    /**
+     *  true if the list supports multiple selection.
      *
      *  @default false
      */
@@ -71,23 +81,24 @@
     //  selectedIndex
     //----------------------------------

-   /**
+
+    [Bindable("selectionChanged")]
+    /**
      *  The 0-based index of the selected item, or -1 if no item is selected.
-     *  Setting the selectedIndex property de-selects the currently selected
+     *  Setting the selectedIndex property deselects the currently selected
      *  item and selects the item at the specified index.
      *
-     *  The value of selectedIndex is always pinned between -1 and
-     *  (numItems - 1). If items at a lower index than selectedIndex are
+     *
The value of selectedIndex is always between -1 and
+     *  (numItems - 1).
+     *  If items at a lower index than selectedIndex are
      *  removed from the component, the selected index is adjusted downward
-     *  accordingly.
-     *
-     *  When the value of the allowMultipleSelection property
-     *  is true, the getter returns the first selected item.
+     *  accordingly.

+     *
+     *
When the value of the allowMultipleSelection property
+     *  is true, the property is set to the first selected item.

      *
      *  @default -1
      */
-
-    [Bindable("selectionChanged")]
     override public function get selectedIndex():int
     {
         if (!allowMultipleSelection)
@@ -99,6 +110,9 @@
         return NO_SELECTION;
     }

+    /**
+     *  @private
+     */
     override public function set selectedIndex(value:int):void
     {
         if (!allowMultipleSelection)
@@ -120,14 +134,19 @@
     private var _proposedSelectedIndices:Array;
     private var multipleSelectionChanged:Boolean = false;

-    /**
+    [Bindable("selectionChanged")]
+    /*
      *  Selected indices for this component.
      *
      *  TODO: describe
      *
      *  @default null
      */
-    [Bindable("selectionChanged")]
+    /**
+     *  Selected indices for this component.
+     *
+     *  @default null
+     */
     public function get selectedIndices():Array
     {
         if (!allowMultipleSelection)
@@ -136,6 +155,9 @@
         return _selectedIndices;
     }

+    /**
+     *  @private
+     */
     public function set selectedIndices(value:Array):void
     {
         if (!allowMultipleSelection)
@@ -148,14 +170,19 @@
         invalidateProperties();
     }

-    /**
+    [Bindable("selectionChanged")]
+    /*
      *  Selected items for this component.
      *
      *  TODO: describe
      *
      *  @default null
      */
-    [Bindable("selectionChanged")]
+    /**
+     *  Selected items for this component.
+     *
+     *  @default null
+     */
     public function get selectedItems():Array
     {
         var result:Array;
@@ -173,6 +200,9 @@
         return result;
     }

+    /**
+     *  @private
+     */
     public function set selectedItems(value:Array):void
     {
         var indices:Array;
@@ -230,40 +260,37 @@
             }
         }
     }
-
-	/**
-	 *  Called when a skin part has been added or assigned.
-	 *  This method pushes the content, layout, itemRenderer, and
-	 *  itemRendererFunction properties down to the contentGroup
-	 *  skin part.
-	 */
-	override protected function partAdded(partName:String, instance:Object):void
-	{
-		super.partAdded(partName, instance);
-		if (instance == dataGroup)
-		{
-			dataGroup.addEventListener(
-			    ItemExistenceChangedEvent.ITEM_ADD, dataGroup_itemAddHandler);
-			dataGroup.addEventListener(
-			    ItemExistenceChangedEvent.ITEM_REMOVE, dataGroup_itemRemoveHandler);
-		}
-	}
-
-	/**
-	 *  Called when a skin part is removed.
-	 */
-	override protected function partRemoved(partName:String, instance:Object):void
-	{
-		if (instance == dataGroup)
-		{
-			dataGroup.removeEventListener(
-			    ItemExistenceChangedEvent.ITEM_ADD, dataGroup_itemAddHandler);
-			dataGroup.removeEventListener(
-			    ItemExistenceChangedEvent.ITEM_REMOVE, dataGroup_itemRemoveHandler);
-		}
-
-		super.partRemoved(partName, instance);
-	}
+
+    /**
+     *  @inheritDoc
+     */
+    override protected function partAdded(partName:String, instance:Object):void
+    {
+        super.partAdded(partName, instance);
+        if (instance == dataGroup)
+        {
+            dataGroup.addEventListener(
+                ItemExistenceChangedEvent.ITEM_ADD, dataGroup_itemAddHandler);
+            dataGroup.addEventListener(
+                ItemExistenceChangedEvent.ITEM_REMOVE, dataGroup_itemRemoveHandler);
+        }
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    override protected function partRemoved(partName:String, instance:Object):void
+    {
+        if (instance == dataGroup)
+        {
+            dataGroup.removeEventListener(
+                ItemExistenceChangedEvent.ITEM_ADD, dataGroup_itemAddHandler);
+            dataGroup.removeEventListener(
+                ItemExistenceChangedEvent.ITEM_REMOVE, dataGroup_itemRemoveHandler);
+        }
+
+        super.partRemoved(partName, instance);
+    }

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