Transferred from the Adobe Open Source Subversion Repository

Revision: 9922
Author:   clucier@adobe.com
Date:     2009-09-02T14:07:30.149272Z

Log Message:
-----------
Several bug fixes:
- Setting element's designLayer to null now properly updates the visual representation.
- DesignLayers are now considered during InterfaceCompilation.
- XMLBuilder now supports mixed content, as such TLF content can now be imported from fx:XML.

QE notes: None
Doc notes: None
Bugs: SDK-22959, SDK-22961, SDK-22661.
Reviewer: Peter, Paul
Tests run: Full compiler cyclone, select Mustella tests that reference mx:XML, Checkin
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/XMLBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/Grammar.jj</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -3053,11 +3053,10 @@
         _designLayer = value;

         if (_designLayer)
-        {
             _designLayer.addEventListener("layerPropertyChange", layer_PropertyChange, false, 0, true);
-            $alpha = _alpha * _designLayer.effectiveAlpha;
-            $visible = _visible && _designLayer.effectiveVisibility;
-        }
+
+        $alpha = _designLayer ? _alpha * _designLayer.effectiveAlpha : _alpha;
+        $visible = designLayer ? _visible && _designLayer.effectiveVisibility : _visible;
     }

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.states
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5185
Author:   anshulg@adobe.com
Date:     2009-03-06T10:41:04.284205Z

Log Message:
-----------
Checking in to get message agent(for endpoint url) in network monitor (for FB). We tested these changes with check in tests for network monitor. This has been reviewed by Seth Hodgson.FB 14940 fixed with this change. No change in documentation in SDK. This needs to be backported to SDK3 (for support for SDK3 as well). This backporting is done.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageAgent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/netmon/NetworkMonitor.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/MessageAgent.as
+++ frameworks/projects/rpc/src/mx/messaging/MessageAgent.as
@@ -1347,7 +1347,7 @@

             else
             {
-	        		NetworkMonitor.monitorInvocation(getNetmonId(), message);
+	        		NetworkMonitor.monitorInvocation(getNetmonId(), message, this);
 	        }
       }
    }


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 2464
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:50:33.449468Z

Log Message:
-----------
add flex 4 to trunk

Modified Paths:
--------------
134 paths were modified

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

--- frameworks/projects/framework/src/mx/geom/Transform.as
+++ frameworks/projects/framework/src/mx/geom/Transform.as
@@ -0,0 +1,80 @@
+package flex.geom
+{
+	import flash.geom.ColorTransform;
+	import flash.geom.Matrix;
+	import flash.geom.Rectangle;
+	import flash.geom.Transform;
+	import flash.display.Shape;
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	import flash.events.IEventDispatcher;
+
+	import mx.events.PropertyChangeEvent;
+
+	public class Transform extends flash.geom.Transform implements IEventDispatcher
+	{
+		private var dispatcher:EventDispatcher;
+		private var _shape:Shape;
+
+		public function Transform()
+		{
+			dispatcher = new EventDispatcher();
+
+			_shape = new Shape();
+			super(_shape);
+
+		}
+
+		[Bindable("propertyChange")]
+		override public function set matrix(value:Matrix):void
+		{
+			var oldMatrix:Matrix = super.matrix;
+			super.matrix = value;
+
+			dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "matrix", oldMatrix, value));
+
+		}
+
+		[Bindable("propertyChange")]
+		override public function set colorTransform(value:ColorTransform):void
+		{
+			var oldColorTransform:ColorTransform = super.colorTransform;
+			super.colorTransform = value;
+
+			dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "colorTransform", oldColorTransform, value));
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  IEventDispatcher properties and methods
+		//
+		//--------------------------------------------------------------------------
+		public function addEventListener(type:String, listener:Function,
+										 useCapture:Boolean = false, priority:int = 0,
+										 useWeakReference:Boolean = false):void
+		{
+			return dispatcher.addEventListener(type, listener, useCapture, priority,
+										useWeakReference);
+		}
+
+		public function dispatchEvent(event:Event):Boolean
+		{
+			 return dispatcher.dispatchEvent(event);
+		}
+
+		public function hasEventListener(type:String):Boolean
+		{
+			return dispatcher.hasEventListener(type);
+		}
+
+		public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
+		{
+			return dispatcher.removeEventListener(type, listener, useCapture);
+		}
+
+		public function willTrigger(type:String):Boolean
+		{
+			return dispatcher.willTrigger(type);
+		}
+	}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4790
Author:   jimurphy@adobe.com
Date:     2009-02-02T18:13:13.580538Z

Log Message:
-----------
Merged 3.x revisions 4710-4711,4741,4746-4747,4755,4777,4787 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.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/formatters/NumberBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloFocusRect.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/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</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/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/mx/src/mx/skins/halo/HaloBorder.as
+++ frameworks/projects/mx/src/mx/skins/halo/HaloBorder.as
@@ -843,11 +843,13 @@

 				if (radiusObj)
 				{
-					var bottomRadius:Number =
-						bRoundedCorners ? radius : 0;
-
-					radiusObj = { tl: radius,
-							      tr: radius,
+					var topRadius:Number =
+ 						Math.max(radius - Math.max(bm.top, bm.left, bm.right), 0);
+ 					var bottomRadius:Number = bRoundedCorners ?
+ 						Math.max(radius - Math.max(bm.bottom, bm.left, bm.right), 0) : 0;
+
+					radiusObj = { tl: topRadius,
+							      tr: topRadius,
 							      bl: bottomRadius,
 							      br: bottomRadius };


Transferred from the Adobe Open Source Subversion Repository

Revision: 6792
Author:   jimurphy@adobe.com
Date:     2009-05-11T18:24:09.346026Z

Log Message:
-----------
Merged revisions 6729,6731,6746,6755,6757,6765,6767-6768,6770-6772,6775,6784-6786,6790 from http://p01weblab02.corp.adobe.com/svn/opensource/flex/sdk/branches/beta1

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/FlashContainerPlaceholder.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/primitives/supportClasses/TextGraphicElement.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/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/TypeHelper.java</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types" copyfrom-rev="6790" action="A">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/swf/FXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/RadioButtonSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types/FXGMatrix.java" copyfrom-rev="6790" action="R">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types/FXGMatrix.java</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -160,7 +160,6 @@
     //----------------------------------

     private var _allowMultipleSelection:Boolean = false;
-    private var allowMultipleSelectionChanged:Boolean = false;

     /**
      *  Boolean flag controlling whether multiple selection
@@ -185,19 +184,9 @@
     public function set allowMultipleSelection(value:Boolean):void
     {
         if (value == _allowMultipleSelection)
-            return
-
-        _allowMultipleSelection = value;
-
-        //Going from multiple to single, clear out selection
-        if (!_allowMultipleSelection)
-        {
-            if (!requiresSelection)
-                _proposedSelectedIndices = [];
-            else
-                _proposedSelectedIndices = [0];
-            commitMultipleSelection();
-        }
+            return;
+
+        _allowMultipleSelection = value;
     }

     //----------------------------------
@@ -210,38 +199,26 @@
      */
     override public function get selectedIndex():int
     {
-        if (!allowMultipleSelection)
-            return super.selectedIndex;
-
-        //The case that selection has been set as a result of
-        //requiresSelection, we want to make sure the multiple selection
-        //properties stay in sync.
-        if (!_selectedIndices && _selectedIndex >= 0)
-        {
-            selectedIndices = [_selectedIndex];
-            return _selectedIndex;
-        }
-
         if (_selectedIndices && _selectedIndices.length > 0)
             return _selectedIndices[_selectedIndices.length - 1];

-        return NO_SELECTION;
+        return super.selectedIndex;
     }

     /**
      *  @private
      */
     override public function set selectedIndex(value:int):void
-    {
-        if (!allowMultipleSelection)
-        {
-            super.selectedIndex = value;
-            return;
-        }
+    {
         if (value == selectedIndex)
             return;
-
-        selectedIndices = [value];
+
+        super.selectedIndex = value;
+
+        if (value !== NO_SELECTION)
+            selectedIndices = [value];
+        else
+            selectedIndices = [];
     }

     //----------------------------------
@@ -254,13 +231,10 @@
      */
     override public function get selectedItem():*
     {
-        if (!allowMultipleSelection || !_selectedIndices)
-            return super.selectedItem;
-
         if (_selectedIndices && _selectedIndices.length > 0)
             return dataProvider.getItemAt(_selectedIndices[_selectedIndices.length - 1]);

-        return undefined;
+        return super.selectedItem;
     }

     /**
@@ -268,15 +242,15 @@
      */
     override public function set selectedItem(value:*):void
     {
-        if (!allowMultipleSelection)
-        {
-            super.selectedItem = value;
-            return;
-        }
         if (value == selectedItem)
             return;
-
-        selectedItems = [value];
+
+        super.selectedItem = value;
+
+        if (value !== undefined)
+            selectedItems = [value];
+        else
+            selectedItems = [];
     }

@@ -301,9 +275,6 @@
      */
     public function get selectedIndices():Array
     {
-        if (!allowMultipleSelection)
-            return null;
-
         return _selectedIndices;
     }

@@ -312,9 +283,6 @@
      */
     public function set selectedIndices(value:Array):void
     {
-        if (!allowMultipleSelection)
-            return;
-
         if (_proposedSelectedIndices == value)
             return;

@@ -393,6 +361,22 @@

     /**
      *  @private
+     *  Let ListBase handle single selection, but we want to make
+     *  sure we keep the multiple selection properties in-sync
+     *  correctly.
+     */
+    override protected function commitSelectedIndex():Boolean
+    {
+        var retVal:Boolean = super.commitSelectedIndex();
+
+        if (_selectedIndex != NO_SELECTION)
+            selectedIndices = [_selectedIndex];
+
+        return retVal;
+    }
+
+    /**
+     *  @private
      */
     override protected function itemSelected(index:int, selected:Boolean):void
     {
@@ -461,6 +445,24 @@
         }

         super.partRemoved(partName, instance);
+    }
+
+    /**
+     *  @private
+     *  Called when an item has been added to this component.
+     */
+    override protected function itemAddedHandler(item:*, index:int):void
+    {
+        adjustSelectedIndices(index, true);
+    }
+
+    /**
+     *  @private
+     *  Called when an item has been removed from this component.
+     */
+    override protected function itemRemovedHandler(item:*, index:int):void
+    {
+        adjustSelectedIndices(index, false);
     }

     //--------------------------------------------------------------------------
@@ -477,12 +479,10 @@
      */
     private function getFirstSelectedIndex():Number
     {
-        if (!allowMultipleSelection)
-            return selectedIndex;
-        else if (selectedIndices && selectedIndices.length > 0)
+        if (selectedIndices && selectedIndices.length > 0)
             return selectedIndices[0];
         else
-            return -1;
+            return 0;
     }

     /**
@@ -507,7 +507,7 @@
         var addedItems:Array = [];
         var i:int;
         var count:int;
-
+
         if (!isEmpty(_selectedIndices) && !isEmpty(_proposedSelectedIndices))
         {
             // Changing selection, determine which items were added to the
@@ -518,7 +518,6 @@
                 if (_selectedIndices.indexOf(_proposedSelectedIndices[i]) < 0)
                     addedItems.push(_proposedSelectedIndices[i]);
             }
-
             // Then determine which items were removed from the selection
             // interval
             count = _selectedIndices.length;
@@ -541,6 +540,10 @@

         // Commit the selected Indices
         _selectedIndices = _proposedSelectedIndices;
+        if (_proposedSelectedIndices.length > 0)
+            _selectedIndex = _proposedSelectedIndices[_proposedSelectedIndices.length - 1];
+        else
+            _selectedIndex = NO_SELECTION;
         _proposedSelectedIndices = null;

         // De-select the old items that were selected
@@ -768,6 +771,82 @@
     }

     /**
+     *  Adjusts the selected indices to account for items being added to or
+     *  removed from this component.
+     *
+     *  @param index The new index.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function adjustSelectedIndices(index:int, add:Boolean):void
+    {
+        var i:int;
+        var curr:Number;
+        var newInterval:Array = [];
+
+        if (selectedIndex == NO_SELECTION || doingWholesaleChanges)
+            return;
+
+        if (add)
+        {
+            for (i = 0; i < selectedIndices.length; i++)
+            {
+                curr = selectedIndices[i];
+                //adding an item above one of the selected items,
+                //bump the selected item up.
+                if (curr >= index)
+                    newInterval.push(curr + 1);
+                else
+                    newInterval.push(curr);
+            }
+        }
+        else
+        {
+            // Quick check to see if we're removing the only selected item
+            // in which case we need to honor requiresSelection.
+            if (!isEmpty(selectedIndices) && selectedIndices.length == 1
+                && index == selectedIndex && requiresSelection)
+            {
+                //Removing the last item
+                if (dataProvider.length == 0)
+                {
+                    newInterval = [];
+                }
+                else if (index == 0)
+                {
+                    //We can't just set selectedIndex to 0 directly
+                    //since the previous value was 0 and the new value is
+                    //0, so the setter will return early.
+                    _proposedSelectedIndex = 0;
+                    invalidateProperties();
+                    return;
+                }
+                else
+                {
+                    newInterval = [0];
+                }
+            }
+            else
+            {
+                for (i = 0; i < selectedIndices.length; i++)
+                {
+                    curr = selectedIndices[i];
+                    //removing an item above one of the selected items,
+                    //bump the selected item down.
+                    if (curr > index)
+                        newInterval.push(curr - 1);
+                    else if (curr < index)
+                        newInterval.push(curr);
+                }
+            }
+        }
+        selectedIndices = newInterval;
+    }
+
+    /**
      *  Used by keyDownHandler to map the keyboard events
      *  to NavigationUnit. The NavigationUnit values are passed to the
      *  layout to figure out what the new item in focus is based on
@@ -815,26 +894,20 @@

         var navigationUnit:uint = mapEventToNavigationUnit(event);

-        if (!dataProvider || !layout)
+        if (!dataProvider || !layout || navigationUnit == NavigationUnit.NONE)
             return;

-        var currentIndex:Number;
-
-        if (allowMultipleSelection && selectedIndices && selectedIndices.length > 0)
-            currentIndex = selectedIndices[selectedIndices.length - 1];
-        else
-            currentIndex = selectedIndex;
+        var currentIndex:Number = selectedIndex;

         // Delegate to the layout to tell us what the next item is we should select or focus into.
         // TODO (jszeto) At some point we should refactor this so we don't depend on layout
         // for keyboard handling. If layout doesn't exist, then use some other keyboard handler
         var proposedNewIndex:int = (selectUponNavigation) ? layout.getDestinationIndex(navigationUnit, currentIndex)
             : layout.getDestinationIndex(navigationUnit, currentCaretIndex);
-
+
         // TODO (jszeto) proposedNewIndex depends on CTRL key
         // move CTRL key logic into single selection
         // add SPACE logic - add to selection for multi-select or change selection for single-select
-

         // Note that the KeyboardEvent is canceled even if the current selected or in focus index
         // doesn't change because we don't want another component to start handling these
@@ -870,8 +943,10 @@
         // Entering the caret state with the Ctrl key down
         else if (event.ctrlKey)
         {
+            //TODO (dsubrama) Finish up caret support, including visual
+            //indicators to default renderers.
             handleCaretChange(proposedNewIndex, true);
-            ensureItemIsVisible(proposedNewIndex);
+            //ensureItemIsVisible(proposedNewIndex);
         }
         // Its just a new selection action
         else


Transferred from the Adobe Open Source Subversion Repository

Revision: 8422
Author:   smgilson@adobe.com
Date:     2009-07-07T14:41:50.996290Z

Log Message:
-----------
ASDoc updates

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/LabelUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/IndexChangeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/TextOperationEvent.as</path>

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

--- frameworks/projects/spark/src/spark/utils/LabelUtil.as
+++ frameworks/projects/spark/src/spark/utils/LabelUtil.as
@@ -13,7 +13,7 @@
 {

 /**
- *  This class typically aids components in determining the correct
+ *  The LabelUtil class is used by components to determine the correct
  *  text to display for their renderers or sub-parts.
  *
  *  @langversion 3.0
@@ -32,24 +32,34 @@
     //--------------------------------------------------------------------------

     /**
-     *  A function typically used by renderer-aware controls to determine
-     *  the correct text a renderer should display for a particular data item,
-     *  given the item, a labelField and a labelFunction. If no labelField
-     *  or labelFunction is set, the toString() representation of the data
-     *  item is returned. Null items return the empty string.
+     *  A function used by components that support item renderers
+     *  to determine the correct text an item renderer should display for a data item.
+     *  If no labelField or labelFunction parameter
+     *  is specified, the toString() method of the data item
+     *  is called to return a String representation of the data item.
+     *
+     *
The labelFunction property takes a reference to a function.
+     *  The function takes a single argument which is the item in
+     *  the data provider and returns a String:

+     *

+     *  myLabelFunction(item:Object):String

      *
-     *  @param item The data item
+     *  @param item The data item. Null items return the empty string.
      *
-     *  @param labelField The field in the data item to return
+     *  @param labelField The field in the data item to return.
      *
      *  @param labelFunction A function that takes the data item
-     *  as a single parameter and returns a string.
+     *  as a single parameter and returns a String.
      *
      *  @return A String representation for the data item
      *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static function itemToLabel(item:Object, labelField:String=null,
-    	labelFunction:Function=null):String
+        labelFunction:Function=null):String
     {
         if (labelFunction != null)
             return labelFunction(item);


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

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/IAdvancedDataGridRendererProvider.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/IAdvancedDataGridRendererProvider.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.controls.advancedDataGridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17465
Author:   jasonsj@adobe.com
Date:     2010-08-24T19:28:57.352686Z

Log Message:
-----------
Fixed regression where titleDisplay was not visible when actionGroup is empty.

QE notes:
Doc notes:
Bugs:
SDK-27560 View title sometimes isn't showing up
Reviewer: rfrishbe
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
@@ -169,14 +169,13 @@
         var navigationGroupWidth:Number = 0;

         var titleCompX:Number = 0;
-        var titleCompWidth:Number = unscaledWidth;
-
-        var actionGroupX:Number = 0;
+        var titleCompWidth:Number = 0;
+
+        var actionGroupX:Number = unscaledWidth;
         var actionGroupWidth:Number = 0;

         // position groups, overlap of navigation and action groups is allowed
         // when overlap occurs, titleDisplay/titleGroup is not visible
-        // (width = 0)
         if (navigationGroup.numElements > 0
             && navigationGroup.includeInLayout)
         {
@@ -196,13 +195,13 @@
             actionGroup.setLayoutBoundsPosition(actionGroupX, 1); // top border
         }

-        titleCompWidth = titleCompWidth - titleCompX - actionGroupWidth;
+        titleCompWidth = unscaledWidth - navigationGroupWidth - actionGroupWidth;
         if (titleCompWidth <= 0)
         {
             titleDisplay.visible = false;
             titleGroup.visible = false;
         }
-        else if (titleGroup.numElements > 0 && titleGroup.includeInLayout)
+        else if (titleGroup.getMXMLContent() != null && titleGroup.includeInLayout)
         {
             titleGroup.setLayoutBoundsSize(titleCompWidth, unscaledHeight);
             titleGroup.setLayoutBoundsPosition(titleCompX, 1);
@@ -228,7 +227,7 @@
             }

             // hide titleDisplay if there is any overlap after padding
-            if ((titleCompX < navigationGroup.getLayoutBoundsWidth())
+            if ((titleCompX < navigationGroupWidth)
                 || ((titleCompX + titleCompWidth) > actionGroupX))
             {
                 titleDisplay.visible = false;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19328
Author:   mhorn@adobe.com
Date:     2010-12-13T20:45:00.405533Z

Log Message:
-----------
ASDoc updates

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationAngledButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationButtonSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
@@ -41,6 +41,14 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
     public function TextInputSkin()
     {
         super();
@@ -88,8 +96,8 @@
     //
     //--------------------------------------------------------------------------

-    /**
-     *  A strongly typed property that references the component to which this skin is applied.
+    /**
+     *  @copy spark.skins.spark.ApplicationSkin#hostComponent
      */
     public var hostComponent:TextInput;  // SkinnableComponent will populate


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDropDownListAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDropDownListAutomationImpl.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: 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@1263087 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/validators/EmailValidator.as
+++ frameworks/projects/framework/src/mx/validators/EmailValidator.as
@@ -0,0 +1,762 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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.validators
+{
+
+[ResourceBundle("validators")]
+
+/**
+ *  The EmailValidator class validates that a String has a single @ sign,
+ *  a period in the domain name and that the top-level domain suffix has
+ *  two, three, four, or six characters.
+ *  IP domain names are valid if they are enclosed in square brackets.
+ *  The validator does not check whether the domain and user name
+ *  actually exist.
+ *
+ *
You can use IP domain names if they are enclosed in square brackets;
+ *  for example, myname@[206.132.22.1].
+ *  You can use individual IP numbers from 0 to 255.

+ *
+ *  @mxml
+ *
+ *
The <mx:EmailValidator> tag
+ *  inherits all of the tag attributes of its superclass,
+ *  and adds the following tag attributes:

+ *
+ *

+ *  <mx:EmailValidator
+ *    invalidCharError="Your e-mail address contains invalid characters."
+ *    invalidDomainError= "The domain in your e-mail address is incorrectly formatted."
+ *    invalidIPDomainError="The IP domain in your e-mail address is incorrectly formatted."
+ *    invalidPeriodsInDomainError="The domain in your e-mail address has consecutive periods."
+ *    missingAtSignError="An at sign (&64;) is missing in your e-mail address."
+ *    missingPeriodInDomainError="The domain in your e-mail address is missing a period."
+ *    missingUsernameError="The username in your e-mail address is missing."
+ *    tooManyAtSignsError="Your e-mail address contains too many &64; characters."
+ *  />
+ *

+ *
+ *  @includeExample examples/EmailValidatorExample.mxml
+ */
+public class EmailValidator extends Validator
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static const DISALLOWED_CHARS:String =
+								"()<>,;:\\\"[] `~!#$%^&*+={}|/?'";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Convenience method for calling a validator
+	 *  from within a custom validation function.
+	 *  Each of the standard Flex validators has a similar convenience method.
+	 *
+	 *  @param validator The EmailValidator instance.
+	 *
+	 *  @param value A field to validate.
+	 *
+	 *  @param baseField Text representation of the subfield
+	 *  specified in the value parameter.
+	 *  For example, if the value parameter specifies value.email,
+	 *  the baseField value is "email".
+	 *
+	 *  @return An Array of ValidationResult objects, with one
+	 *  ValidationResult object for each field examined by the validator.
+	 *
+	 *  @see mx.validators.ValidationResult
+	 */
+	public static function validateEmail(validator:EmailValidator,
+										 value:Object,
+										 baseField:String):Array
+	{
+		var results:Array = [];
+
+		// Validate the domain name
+		// If IP domain, then must follow [x.x.x.x] format
+		// Can not have continous periods.
+		// Must have at least one period.
+		// Must end in a top level domain name that has 2, 3, 4, or 6 characters.
+
+		var emailStr:String = String(value);
+		var username:String = "";
+		var domain:String = "";
+		var n:int;
+		var i:int;
+
+		// Find the @
+		var ampPos:int = emailStr.indexOf("@");
+		if (ampPos == -1)
+		{
+			results.push(new ValidationResult(
+				true, baseField, "missingAtSign",
+				validator.missingAtSignError));
+			return results;
+		}
+		// Make sure there are no extra @s.
+		else if (emailStr.indexOf("@", ampPos + 1) != -1)
+		{
+			results.push(new ValidationResult(
+				true, baseField, "tooManyAtSigns",
+				validator.tooManyAtSignsError));
+			return results;
+		}
+
+		// Separate the address into username and domain.
+		username = emailStr.substring(0, ampPos);
+		domain = emailStr.substring(ampPos + 1);
+
+		// Validate username has no illegal characters
+		// and has at least one character.
+		var usernameLen:int = username.length;
+		if (usernameLen == 0)
+		{
+			results.push(new ValidationResult(
+				true, baseField, "missingUsername",
+				validator.missingUsernameError));
+			return results;
+		}
+
+		for (i = 0; i < usernameLen; i++)
+		{
+			if (DISALLOWED_CHARS.indexOf(username.charAt(i)) != -1)
+			{
+				results.push(new ValidationResult(
+					true, baseField, "invalidChar",
+					validator.invalidCharError));
+				return results;
+			}
+		}
+
+		var domainLen:int = domain.length;
+
+		// check for IP address
+		if ((domain.charAt(0) == "[") && (domain.charAt(domainLen - 1) == "]"))
+		{
+			// Validate IP address
+			if (!isValidIPAddress(domain.substring(1, domainLen - 1)))
+			{
+				results.push(new ValidationResult(
+						true, baseField, "invalidIPDomain",
+						validator.invalidIPDomainError));
+				return results;
+			}
+		}
+		else
+		{
+			// Must have at least one period
+			var periodPos:int = domain.indexOf(".");
+			var nextPeriodPos:int = 0;
+			var lastDomain:String = "";
+
+			if (periodPos == -1)
+			{
+				results.push(new ValidationResult(
+					true, baseField, "missingPeriodInDomain",
+					validator.missingPeriodInDomainError));
+				return results;
+			}
+
+			while (true)
+			{
+				nextPeriodPos = domain.indexOf(".", periodPos + 1);
+				if (nextPeriodPos == -1)
+				{
+					lastDomain = domain.substring(periodPos + 1);
+					if (lastDomain.length != 3 &&
+						lastDomain.length != 2 &&
+						lastDomain.length != 4 &&
+						lastDomain.length != 6)
+					{
+						results.push(new ValidationResult(
+							true, baseField, "invalidDomain",
+							validator.invalidDomainError));
+						return results;
+					}
+					break;
+				}
+				else if (nextPeriodPos == periodPos + 1)
+				{
+					results.push(new ValidationResult(
+						true, baseField, "invalidPeriodsInDomain",
+						validator.invalidPeriodsInDomainError));
+					return results;
+				}
+				periodPos = nextPeriodPos;
+			}
+
+			// Check that there are no illegal characters in the domain.
+			for (i = 0; i < domainLen; i++)
+			{
+				if (DISALLOWED_CHARS.indexOf(domain.charAt(i)) != -1)
+				{
+					results.push(new ValidationResult(
+						true, baseField, "invalidChar",
+						validator.invalidCharError));
+					return results;
+				}
+			}
+
+			// Check that the character immediately after the @ is not a period.
+			if (domain.charAt(0) == ".")
+			{
+				results.push(new ValidationResult(
+					true, baseField, "invalidDomain",
+					validator.invalidDomainError));
+				return results;
+			}
+		}
+
+		return results;
+	}
+
+	/**
+	 * Validate a given IP address
+	 *
+	 * If IP domain, then must follow [x.x.x.x] format
+	 * or for IPv6, then follow [x:x:x:x:x:x:x:x] or [x::x:x:x] or some
+	 * IPv4 hybrid, like [::x.x.x.x] or [0:00::192.168.0.1]
+	 *
+	 * @private
+	 */
+	private static function isValidIPAddress(ipAddr:String):Boolean
+	{
+		var ipArray:Array = [];
+		var pos:int = 0;
+		var newpos:int = 0;
+		var item:Number;
+		var n:int;
+		var i:int;
+
+		// if you have :, you're in IPv6 mode
+		// if you have ., you're in IPv4 mode
+
+		if (ipAddr.indexOf(":") != -1)
+		{
+			// IPv6
+
+			// validate by splitting on the colons
+			// to make it easier, since :: means zeros,
+			// lets rid ourselves of these wildcards in the beginning
+			// and then validate normally
+
+			// get rid of unlimited zeros notation so we can parse better
+			var hasUnlimitedZeros:Boolean = ipAddr.indexOf("::") != -1;
+			if (hasUnlimitedZeros)
+			{
+				ipAddr = ipAddr.replace(/^::/, "");
+				ipAddr = ipAddr.replace(/::/g, ":");
+			}
+
+			while (true)
+			{
+				newpos = ipAddr.indexOf(":", pos);
+				if (newpos != -1)
+				{
+					ipArray.push(ipAddr.substring(pos,newpos));
+				}
+				else
+				{
+					ipArray.push(ipAddr.substring(pos));
+					break;
+				}
+				pos = newpos + 1;
+			}
+
+			n = ipArray.length;
+
+			const lastIsV4:Boolean = ipArray[n-1].indexOf(".") != -1;
+
+			if (lastIsV4)
+			{
+				// if no wildcards, length must be 7
+				// always, never more than 7
+				if ((ipArray.length != 7 && !hasUnlimitedZeros) || (ipArray.length > 7))
+					return false;
+
+				for (i = 0; i < n; i++)
+				{
+					if (i == n-1)
+					{
+						// IPv4 part...
+						return isValidIPAddress(ipArray[i]);
+					}
+
+					item = parseInt(ipArray[i], 16);
+
+					if (item != 0)
+						return false;
+				}
+			}
+			else
+			{
+
+				// if no wildcards, length must be 8
+				// always, never more than 8
+				if ((ipArray.length != 8 && !hasUnlimitedZeros) || (ipArray.length > 8))
+					return false;
+
+				for (i = 0; i < n; i++)
+				{
+					item = parseInt(ipArray[i], 16);
+
+					if (isNaN(item) || item < 0 || item > 0xFFFF)
+						return false;
+				}
+			}
+
+			return true;
+		}
+
+		if (ipAddr.indexOf(".") != -1)
+		{
+			// IPv4
+
+			// validate by splling on the periods
+			while (true)
+			{
+				newpos = ipAddr.indexOf(".", pos);
+				if (newpos != -1)
+				{
+					ipArray.push(ipAddr.substring(pos,newpos));
+				}
+				else
+				{
+					ipArray.push(ipAddr.substring(pos));
+					break;
+				}
+				pos = newpos + 1;
+			}
+
+			if (ipArray.length != 4)
+				return false;
+
+			n = ipArray.length;
+			for (i = 0; i < n; i++)
+			{
+				item = Number(ipArray[i]);
+				if (isNaN(item) || item < 0 || item > 255)
+					return false;
+			}
+
+			return true;
+		}
+
+		return false;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function EmailValidator()
+	{
+		super();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties: Errors
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  invalidCharError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the invalidCharError property.
+	 */
+	private var _invalidCharError:String;
+
+    /**
+	 *  @private
+	 */
+	private var invalidCharErrorOverride:String;
+
+	[Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+	 *  Error message when there are invalid characters in the e-mail address.
+	 *
+	 *  @default "Your e-mail address contains invalid characters."
+     */
+	public function get invalidCharError():String
+	{
+		return _invalidCharError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set invalidCharError(value:String):void
+	{
+		invalidCharErrorOverride = value;
+
+		_invalidCharError = value != null ?
+							value :
+							resourceManager.getString(
+								"validators", "invalidCharErrorEV");
+	}
+
+	//----------------------------------
+	//  invalidDomainError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the invalidDomainError property.
+	 */
+	private var _invalidDomainError:String;
+
+    /**
+	 *  @private
+	 */
+	private var invalidDomainErrorOverride:String;
+
+	[Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+	 *  Error message when the suffix (the top level domain)
+	 *  is not 2, 3, 4 or 6 characters long.
+	 *
+	 *  @default "The domain in your e-mail address is incorrectly formatted."
+     */
+	public function get invalidDomainError():String
+	{
+		return _invalidDomainError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set invalidDomainError(value:String):void
+	{
+		invalidDomainErrorOverride = value;
+
+		_invalidDomainError = value != null ?
+							  value :
+							  resourceManager.getString(
+							      "validators", "invalidDomainErrorEV");
+	}
+
+	//----------------------------------
+	//  invalidIPDomainError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the invalidIPDomainError property.
+	 */
+	private var _invalidIPDomainError:String;
+
+    /**
+	 *  @private
+	 */
+	private var invalidIPDomainErrorOverride:String;
+
+	[Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+	 *  Error message when the IP domain is invalid. The IP domain must be enclosed by square brackets.
+	 *
+	 *  @default "The IP domain in your e-mail address is incorrectly formatted."
+     */
+	public function get invalidIPDomainError():String
+	{
+		return _invalidIPDomainError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set invalidIPDomainError(value:String):void
+	{
+		invalidIPDomainErrorOverride = value;
+
+		_invalidIPDomainError = value != null ?
+								value :
+								resourceManager.getString(
+									"validators", "invalidIPDomainError");
+	}
+
+	//----------------------------------
+	//  invalidPeriodsInDomainError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the invalidPeriodsInDomainError property.
+	 */
+	private var _invalidPeriodsInDomainError:String;
+
+    /**
+	 *  @private
+	 */
+	private var invalidPeriodsInDomainErrorOverride:String;
+
+	[Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+	 *  Error message when there are continuous periods in the domain.
+	 *
+	 *  @default "The domain in your e-mail address has continous periods."
+     */
+	public function get invalidPeriodsInDomainError():String
+	{
+		return _invalidPeriodsInDomainError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set invalidPeriodsInDomainError(value:String):void
+	{
+		invalidPeriodsInDomainErrorOverride = value;
+
+		_invalidPeriodsInDomainError = value != null ?
+									   value :
+									   resourceManager.getString(
+									       "validators", "invalidPeriodsInDomainError");
+	}
+
+	//----------------------------------
+	//  missingAtSignError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the missingAtSignError property.
+	 */
+	private var _missingAtSignError:String;
+
+    /**
+	 *  @private
+	 */
+	private var missingAtSignErrorOverride:String;
+
+	[Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+	 *  Error message when there is no at sign in the email address.
+	 *
+	 *  @default "An at sign (&64;) is missing in your e-mail address."
+     */
+	public function get missingAtSignError():String
+	{
+		return _missingAtSignError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set missingAtSignError(value:String):void
+	{
+		missingAtSignErrorOverride = value;
+
+		_missingAtSignError = value != null ?
+							  value :
+							  resourceManager.getString(
+							      "validators", "missingAtSignError");
+	}
+
+	//----------------------------------
+	//  missingPeriodInDomainError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the missingPeriodInDomainError property.
+	 */
+	private var _missingPeriodInDomainError:String;
+
+    /**
+	 *  @private
+	 */
+	private var missingPeriodInDomainErrorOverride:String;
+
+	[Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+	 *  Error message when there is no period in the domain.
+	 *
+	 *  @default "The domain in your e-mail address is missing a period."
+     */
+	public function get missingPeriodInDomainError():String
+	{
+		return _missingPeriodInDomainError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set missingPeriodInDomainError(value:String):void
+	{
+		missingPeriodInDomainErrorOverride = value;
+
+		_missingPeriodInDomainError = value != null ?
+									  value :
+									  resourceManager.getString(
+									      "validators", "missingPeriodInDomainError");
+	}
+
+	//----------------------------------
+	//  missingUsernameError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the missingUsernameError property.
+	 */
+	private var _missingUsernameError:String;
+
+    /**
+	 *  @private
+	 */
+	private var missingUsernameErrorOverride:String;
+
+	[Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+	 *  Error message when there is no username.
+	 *
+	 *  @default "The username in your e-mail address is missing."
+     */
+	public function get missingUsernameError():String
+	{
+		return _missingUsernameError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set missingUsernameError(value:String):void
+	{
+		missingUsernameErrorOverride = value;
+
+		_missingUsernameError = value != null ?
+								value :
+								resourceManager.getString(
+									"validators", "missingUsernameError");
+	}
+
+	//----------------------------------
+	//  tooManyAtSignsError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the tooManyAtSignsError property.
+	 */
+	private var _tooManyAtSignsError:String;
+
+    /**
+	 *  @private
+	 */
+	private var tooManyAtSignsErrorOverride:String;
+
+	[Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+	 *  Error message when there is more than one at sign in the e-mail address.
+	 *  This property is optional.
+	 *
+	 *  @default "Your e-mail address contains too many &64; characters."
+     */
+	public function get tooManyAtSignsError():String
+	{
+		return _tooManyAtSignsError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set tooManyAtSignsError(value:String):void
+	{
+		tooManyAtSignsErrorOverride = value;
+
+		_tooManyAtSignsError = value != null ?
+							   value :
+							   resourceManager.getString(
+							       "validators", "tooManyAtSignsError");
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 *  @private
+     */
+	override protected function resourcesChanged():void
+	{
+		super.resourcesChanged();
+
+		invalidCharError = invalidCharErrorOverride;
+		invalidDomainError = invalidDomainErrorOverride;
+		invalidIPDomainError = invalidIPDomainErrorOverride;
+		invalidPeriodsInDomainError = invalidPeriodsInDomainErrorOverride;
+		missingAtSignError = missingAtSignErrorOverride;
+		missingPeriodInDomainError = missingPeriodInDomainErrorOverride;
+		missingUsernameError = missingUsernameErrorOverride;
+		tooManyAtSignsError = tooManyAtSignsErrorOverride;
+	}
+
+	/**
+     *  Override of the base class doValidation() method
+     *  to validate an e-mail address.
+	 *
+	 *
You do not call this method directly;
+	 *  Flex calls it as part of performing a validation.
+	 *  If you create a custom Validator class, you must implement this method.

+	 *
+	 *  @param value Either a String or an Object to validate.
+     *
+	 *  @return An Array of ValidationResult objects, with one ValidationResult
+	 *  object for each field examined by the validator.
+	 */
+	override protected function doValidation(value:Object):Array
+    {
+		var results:Array = super.doValidation(value);
+
+		// Return if there are errors
+		// or if the required property is set to false and length is 0.
+		var val:String = value ? String(value) : "";
+		if (results.length > 0 || ((val.length == 0) && !required))
+			return results;
+		else
+		    return EmailValidator.validateEmail(this, value, null);
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18532
Author:   chiedozi@adobe.com
Date:     2010-11-10T22:11:29.162852Z

Log Message:
-----------
Added a new menuKeyPressed event to FlexEvent that is dispatched on an active view when the menu key is pressed
A View can now cancel MobileApplication's default menu logic by canceling the menuKeyPressed event
MobileApplicationBase.backKeyHandler() now takes a KeyboardEvent as a parameter

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/View.as
+++ frameworks/projects/mobilecomponents/src/spark/components/View.as
@@ -59,6 +59,20 @@
 [Event(name="dataChange", type="mx.events.FlexEvent")]

 /**
+ *  Dispatched when the menu key is pressed when a view exists inside
+ *  a mobile application.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ *
+ *  @eventType mx.events.FlexEvent.MENU_KEY_PRESSED
+ *
+ */
+[Event(name="menuKeyPressed", type="mx.events.FlexEvent")]
+
+/**
  *  Dispatched when the current view has been activated.
  *
  *  @eventType mx.events.ViewNavigatorEvent.VIEW_ACTIVATE
@@ -210,11 +224,29 @@
     /**
      *  @private
      */
-    mx_internal function backKeyHandler():Boolean
+    mx_internal function backKeyHandledByView():Boolean
     {
         if (hasEventListener(FlexEvent.BACK_KEY_PRESSED))
         {
             var event:FlexEvent = new FlexEvent(FlexEvent.BACK_KEY_PRESSED, false, true);
+            var eventCanceled:Boolean = !dispatchEvent(event);
+
+            // If the event was canceled, that means the application
+            // is doing its own custom logic for the back key
+            return eventCanceled;
+        }
+
+        return false;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function menuKeyHandledByView():Boolean
+    {
+        if (hasEventListener(FlexEvent.MENU_KEY_PRESSED))
+        {
+            var event:FlexEvent = new FlexEvent(FlexEvent.MENU_KEY_PRESSED, false, true);
             var eventCanceled:Boolean = !dispatchEvent(event);

             // If the event was canceled, that means the application
@@ -761,10 +793,13 @@
     }

     /**
-     *  Returns the state the view should be in based on the orientation
-     *  of the device.
-     *
-     *  @return A String specifying the name of the state to apply to the screen.
+     *  Checks the aspect ratio of the stage and returns the proper state
+     *  that the View should change to.  The possible values are either "portrait"
+     *  or "landscape".  The state is only changed if the desired state exists
+     *  on the View. If it does not, this method will return the component's
+     *  current state.
+     *
+     *  @return A String specifying the name of the state to apply to the view.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -793,7 +828,8 @@
      */
     private function stage_orientationChangeHandler(event:StageOrientationEvent):void
     {
-        setCurrentState(getCurrentViewState(), false);
+        if (isActive)
+        	setCurrentState(getCurrentViewState(), false);
     }


Added option to specify a handler in getJsonObject()

--- WeaveData/src/weave/services/JsonCache.as
+++ WeaveData/src/weave/services/JsonCache.as
@@ -15,13 +15,7 @@

 package weave.services
 {
-	import flash.events.Event;
 	import flash.external.ExternalInterface;
-	import flash.net.URLRequest;
-
-	import mx.rpc.events.FaultEvent;
-	import mx.rpc.events.ResultEvent;
-	import mx.utils.StringUtil;

 	import weave.api.core.ILinkableObject;
 	import weave.api.getCallbackCollection;
@@ -38,43 +32,26 @@

 		public function clearCache():void
 		{
+			for each (var entry:CacheEntry in cache)
+				entry.dispose();
 			cache = {};
 			getCallbackCollection(this).triggerCallbacks();
 		}

-		public function getJsonObject(url:String):Object
+		/**
+		 * @param url The URL to get JSON data
+		 * @param resultHandler
+		 */
+		public function getJsonObject(url:String, resultHandler:Function = null):Object
 		{
-			if (!cache.hasOwnProperty(url))
+			var entry:CacheEntry = cache[url];
+			if (!entry)
 			{
-				cache[url] = {};
-				addAsyncResponder(
-					WeaveAPI.URLRequestUtils.getURL(this, new URLRequest(url), URLRequestUtils.DATA_FORMAT_TEXT),
-					handleResponse,
-					handleResponse,
-					url
-				);
+				entry = new CacheEntry(this, url);
+				cache[url] = entry;
 			}
-			return cache[url];
-		}
-
-		private function handleResponse(event:Event, url:String):void
-		{
-			var response:Object;
-			if (event is ResultEvent)
-			{
-				response = (event as ResultEvent).result;
-				response = parseJSON(response as String);
-				if (response)
-					cache[url] = response;
-			}
-			else
-			{
-				response = (event as FaultEvent).fault.content;
-				if (response)
-					reportError("Request failed: " + url + "\n" + StringUtil.trim(String(response)));
-				else
-					reportError(event);
-			}
+			entry.addHandler(resultHandler);
+			return entry.result;
 		}

 		public static function parseJSON(json:String):Object
@@ -98,3 +75,82 @@
 		}
 	}
 }
+
+import flash.events.Event;
+import flash.net.URLRequest;
+
+import mx.rpc.events.FaultEvent;
+import mx.rpc.events.ResultEvent;
+import mx.utils.StringUtil;
+
+import weave.api.reportError;
+import weave.services.JsonCache;
+import weave.services.URLRequestUtils;
+import weave.services.addAsyncResponder;
+
+internal class CacheEntry
+{
+	public function CacheEntry(owner:JsonCache, url:String)
+	{
+		this.owner = owner;
+		this.url = url;
+
+		addAsyncResponder(
+			WeaveAPI.URLRequestUtils.getURL(owner, new URLRequest(url), URLRequestUtils.DATA_FORMAT_TEXT),
+			handleResponse,
+			handleResponse
+		);
+	}
+
+	public var owner:JsonCache;
+	public var url:String;
+	public var handlers:Array = [];
+	public var result:Object = {};
+
+	private function handleResponse(event:Event, token:Object = null):void
+	{
+		// stop if disposed
+		if (!owner)
+			return;
+
+		var response:Object;
+		if (event is ResultEvent)
+		{
+			response = (event as ResultEvent).result;
+			response = JsonCache.parseJSON(response as String);
+			// avoid storing a null value
+			if (response != null)
+				result = response;
+			// call handlers
+			while (handlers.length)
+				(handlers.pop() as Function).apply(null, [result]);
+			// stop further handlers from being added
+			handlers = null;
+		}
+		else
+		{
+			response = (event as FaultEvent).fault.content;
+			if (response)
+				reportError("Request failed: " + url + "\n" + StringUtil.trim(String(response)));
+			else
+				reportError(event);
+		}
+	}
+
+	public function addHandler(handler:Function):void
+	{
+		if (handler == null)
+			return;
+
+		if (handlers)
+			handlers.push(handler);
+		else
+			WeaveAPI.StageUtils.callLater(owner, handler, [result]);
+	}
+
+	public function dispose():void
+	{
+		owner = null;
+		handlers = null;
+	}
+}


Make BufferedStream public.

Make BufferedStream public.

--- src/stdio/BufferedStream.as
+++ src/stdio/BufferedStream.as
@@ -1,5 +1,5 @@
 package stdio {
-  internal class BufferedStream implements InputStream, OutputStream {
+  public class BufferedStream implements InputStream, OutputStream {
     public var buffer: String = ""
     public var closed: Boolean = false


Git missed this file - added import

Git missed this file - added import

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as
@@ -33,6 +33,7 @@
 import spark.skins.mobile160.assets.TextInput_border;
 import spark.skins.mobile240.assets.TextInput_border;
 import spark.skins.mobile320.assets.TextInput_border;
+import spark.skins.mobile480.assets.TextInput_border;

 use namespace mx_internal;


registering LinkableDynamicObject as the default implementation for ILinkableDynamicObject

--- WeaveJS/src/WeaveJS.as
+++ WeaveJS/src/WeaveJS.as
@@ -7,6 +7,7 @@
 package
 {
 	import weavejs.WeaveAPI;
+	import weavejs.api.core.ILinkableDynamicObject;
 	import weavejs.api.core.ILinkableHashMap;
 	import weavejs.api.core.ILocale;
 	import weavejs.api.core.IProgressIndicator;
@@ -19,6 +20,7 @@
 	import weavejs.api.net.IURLRequestUtils;
 	import weavejs.api.ui.IEditorManager;
 	import weavejs.core.EditorManager;
+	import weavejs.core.LinkableDynamicObject;
 	import weavejs.core.LinkableHashMap;
 	import weavejs.core.LinkableVariable;
 	import weavejs.core.Locale;
@@ -62,6 +64,7 @@
 			);

 			WeaveAPI.ClassRegistry.registerImplementation(ILinkableHashMap, LinkableHashMap);
+			WeaveAPI.ClassRegistry.registerImplementation(ILinkableDynamicObject, LinkableDynamicObject);
 			WeaveAPI.ClassRegistry.registerSingletonImplementation(IURLRequestUtils, URLRequestUtils);
 			WeaveAPI.ClassRegistry.registerSingletonImplementation(IAttributeColumnCache, AttributeColumnCache);
 			WeaveAPI.ClassRegistry.registerSingletonImplementation(ISessionManager, SessionManager);


updateProbeLines():  Changed the condition that checked for
DraggablePanel.activePanel to a check for mouseIsRolledOver

Change-Id: I74647fea44baa494bfd53a7306fa2741cb2154f7

--- WeaveUI/src/weave/visualization/layers/SimpleInteractiveVisualization.as
+++ WeaveUI/src/weave/visualization/layers/SimpleInteractiveVisualization.as
@@ -517,7 +517,7 @@
 			}
 			var recordKeys:Array = keySet.keys;

-			if( (recordKeys.length == 0) || ((this.parent as DraggablePanel) != DraggablePanel.activePanel))
+			if( (recordKeys.length == 0) || !this.mouseIsRolledOver)
 			{
 				_probePlotter.clearCoordinates();
 				return;


freeze icon's size in 2d

freeze icon's size in 2d

--- bin/Data/Scripts/Editor/EditorViewDebugIcons.as
+++ bin/Data/Scripts/Editor/EditorViewDebugIcons.as
@@ -124,6 +124,7 @@
     if (debugIconsShow == false) return;

     Vector3 camPos = activeViewport.cameraNode.worldPosition;
+    bool isOrthographic = activeViewport.camera.orthographic;
     debugIconsPlacement.Clear();

     for(int iconType=0; iconType<ICON_COUNT; iconType++)
@@ -155,6 +156,7 @@
                     Billboard@ bb = null;
                     Color finalIconColor = debugIconsColors[ICON_COLOR_DEFAULT];
                     float distance = (camPos - nodes[i].worldPosition).length;
+                    if (isOrthographic) distance = 15.0f;
                     int iconsOffset = debugIconsPlacement[StringHash(nodes[i].id)].GetInt();
                     float iconsYPos = 0;

@@ -169,6 +171,7 @@
                                 Vector3 splinePoint = sp.GetPoint(splineStep * step);
                                 Billboard@ bb = debugIconsSet[ICON_SPLINE_PATH].billboards[index];
                                 float stepDistance = (camPos - splinePoint).length;
+                                if (isOrthographic) stepDistance = 15.0f;

                                 if(step == 0) // SplinePath start
                                 {