API to get/set buffer length in segments.

--- KalturaHLSPlugin/src/KalturaHLSPlugin.as
+++ KalturaHLSPlugin/src/KalturaHLSPlugin.as
@@ -1,6 +1,7 @@
 package
 {
 	import com.kaltura.hls.HLSPluginInfo;
+	import com.kaltura.hls.manifest.HLSManifestParser;
     import com.kaltura.kdpfl.model.MediaProxy;
     import com.kaltura.kdpfl.plugin.IPlugin;
     import com.kaltura.kdpfl.plugin.IPluginFactory;
@@ -25,6 +26,7 @@
         private static const HLS_PLUGIN_INFO:String = "com.kaltura.hls.HLSPluginInfo";
 		private var _pluginResource:MediaResourceBase;

+		private var _segmentBuffer:int = -1;

         public function KalturaHLSPlugin()
         {
@@ -32,6 +34,16 @@
             _pluginInfo = new HLSPluginInfo();
         }

+		public function get segmentBuffer():int
+		{
+			return _segmentBuffer;
+		}
+
+		public function set segmentBuffer(value:int):void
+		{
+			_segmentBuffer = value;
+		}
+
         public function create (pluginName : String =null) : IPlugin
         {
             return this;
@@ -61,6 +73,9 @@
         {
 			if ( e.resource && e.resource == _pluginResource ) {
 				e.target.removeEventListener(MediaFactoryEvent.PLUGIN_LOAD, onOSMFPluginLoaded);
+				if (segmentBuffer != -1){
+					HLSManifestParser.MAX_SEG_BUFFER = segmentBuffer; // if passed by JS, update static MAX_SEG_BUFFER with the new value
+				}
 				dispatchEvent( new KPluginEvent (KPluginEvent.KPLUGIN_INIT_COMPLETE) );
 			}


FLEX-35031 Added more unit tests to define how findAny() and findLast() should work, for when I attempt fixes for this bug. -By adding more unit tests I also found that null as a parameter to findAny() or findLast() makes the cursor think it's found that value.

--- frameworks/projects/advancedgrids/tests/mx/collections/HierarchicalCollectionViewCursor_FindAny_Tests.as
+++ frameworks/projects/advancedgrids/tests/mx/collections/HierarchicalCollectionViewCursor_FindAny_Tests.as
@@ -19,6 +19,8 @@

 package mx.collections {
     import org.flexunit.asserts.assertEquals;
+    import org.flexunit.asserts.assertFalse;
+    import org.flexunit.asserts.assertNotNull;
     import org.flexunit.asserts.assertTrue;

     public class HierarchicalCollectionViewCursor_FindAny_Tests
@@ -112,7 +114,7 @@
         }

         [Test] //FLEX-35031
-        public function test_FLEX_35031_finding_sealed_class_instance():void
+        public function test_FLEX_35031_finding_current_sealed_class_instance_with_findFirst():void
         {
             //given
             _utils.openAllNodes(_collectionView);
@@ -129,7 +131,41 @@
         }

         [Test] //FLEX-35031
-        public function test_FLEX_35031_finding_sealed_class_instance_with_findLast():void
+        public function test_FLEX_35031_finding_different_sealed_class_instance_with_findAny():void
+        {
+            //given
+            _utils.openAllNodes(_collectionView);
+            var salesGroup:Object = _level0.getItemAt(1);
+            var salesEmployee:EmployeeVO = salesGroup.children.getItemAt(0) as EmployeeVO;
+            assertEquals(DEPARTMENT_SALES, salesEmployee.department);
+
+            //when
+            var found:Boolean = _sut.findAny(salesEmployee);
+
+            //then
+            assertTrue(found);
+            assertEquals(salesEmployee, _sut.current);
+        }
+
+        [Test] //FLEX-35031
+        public function test_FLEX_35031_finding_different_sealed_class_instance_with_findLast():void
+        {
+            //given
+            _utils.openAllNodes(_collectionView);
+            var developmentGroup:Object = _level0.getItemAt(0);
+            var developmentEmployee:EmployeeVO = developmentGroup.children.getItemAt(0) as EmployeeVO;
+            assertEquals(DEPARTMENT_DEVELOPMENT, developmentEmployee.department);
+
+            //when
+            var found:Boolean = _sut.findLast(developmentEmployee);
+
+            //then
+            assertTrue(found);
+            assertEquals(developmentEmployee, _sut.current);
+        }
+
+        [Test] //FLEX-35031
+        public function test_FLEX_35031_finding_sealed_class_instance_from_current_with_findLast():void
         {
             //given
             _utils.openAllNodes(_collectionView);
@@ -143,6 +179,98 @@
             assertTrue(found);
             assertTrue(_sut.current is EmployeeVO);
             assertEquals(DEPARTMENT_DEVELOPMENT, EmployeeVO(_sut.current).department);
+        }
+
+        [Test] //FLEX-33058
+        public function test_FLEX_33058_when_not_found_via_findAny_using_anonymous_object_current_is_null():void
+        {
+            //given
+            _utils.openAllNodes(_collectionView);
+
+            //when
+            var found:Boolean = _sut.findAny({someProperty:"someValue"});
+
+            //then
+            assertFalse(found);
+            assertEquals(null, _sut.current);
+        }
+
+        [Test] //FLEX-33058
+        public function test_FLEX_33058_when_not_found_via_findLast_using_anonymous_object_current_is_null():void
+        {
+            //given
+            _utils.openAllNodes(_collectionView);
+
+            //when
+            var found:Boolean = _sut.findLast({someProperty:"someValue"});
+
+            //then
+            assertFalse(found);
+            assertEquals(null, _sut.current);
+        }
+
+        [Test] //FLEX-35031
+        public function test_FLEX_35031_findAny_does_not_fatal_when_trying_to_find_null_and_doesnt_find_it():void
+        {
+            //given
+            _utils.openAllNodes(_collectionView);
+
+            //when
+            var found:Boolean = _sut.findAny(null);
+
+            //then
+            assertFalse(found);
+            assertEquals(null, _sut.current);
+        }
+
+        [Test] //FLEX-35031
+        public function test_FLEX_35031_findLast_does_not_fatal_when_trying_to_find_null_and_doesnt_find_it():void
+        {
+            //given
+            _utils.openAllNodes(_collectionView);
+
+            //when
+            var found:Boolean = _sut.findLast(null);
+
+            //then
+            assertFalse(found);
+            assertEquals(null, _sut.current);
+        }
+
+        [Test]
+        public function test_findAny_finds_sealed_class_instance_via_anonymous_object_with_subset_of_properties():void
+        {
+            //given
+            const ID_TO_FIND:int = 1;
+            _utils.openAllNodes(_collectionView);
+
+            //when
+            var found:Boolean = _sut.findAny({department:DEPARTMENT_SALES, idInDepartment:ID_TO_FIND});
+
+            //then
+            assertTrue(found);
+            var currentEmployee:EmployeeVO = _sut.current as EmployeeVO;
+            assertNotNull(currentEmployee);
+            assertEquals(DEPARTMENT_SALES, currentEmployee.department);
+            assertEquals(ID_TO_FIND, currentEmployee.idInDepartment);
+        }
+
+        [Test]
+        public function test_findLast_finds_sealed_class_instance_via_anonymous_object_with_subset_of_properties():void
+        {
+            //given
+            const ID_TO_FIND:int = 1;
+            _utils.openAllNodes(_collectionView);
+
+            //when
+            var found:Boolean = _sut.findLast({department:DEPARTMENT_DEVELOPMENT, idInDepartment:ID_TO_FIND});
+
+            //then
+            assertTrue(found);
+            var currentEmployee:EmployeeVO = _sut.current as EmployeeVO;
+            assertNotNull(currentEmployee);
+            assertEquals(DEPARTMENT_DEVELOPMENT, currentEmployee.department);
+            assertEquals(ID_TO_FIND, currentEmployee.idInDepartment);
         }

         private static function createHierarchicalCollectionView(groupingCollection:GroupingCollection2):HierarchicalCollectionView


Transferred from the Adobe Open Source Subversion Repository

Revision: 19183
Author:   jszeto@adobe.com
Date:     2010-12-09T00:13:15.261058Z

Log Message:
-----------
ViewMenu Modal fix

http://bugs.adobe.com/jira/browse/SDK-28770 - ViewMenu should probably be modal

Added mouseShield to ViewNavigatorApplicationBase skin when ViewMenu is open.

QE notes: none
Doc notes: none
Bugs: SDK-28770
Reviewer: Evtim
Tests run: checkintests
Is noteworthy for integration: no

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
@@ -12,7 +12,9 @@
 package spark.components.supportClasses
 {
 import flash.desktop.NativeApplication;
+import flash.display.Graphics;
 import flash.display.InteractiveObject;
+import flash.display.Sprite;
 import flash.display.StageOrientation;
 import flash.events.Event;
 import flash.events.InvokeEvent;
@@ -33,9 +35,9 @@
 import spark.components.View;
 import spark.components.ViewMenu;
 import spark.components.ViewMenuItem;
+import spark.events.PopUpEvent;
 import spark.managers.IPersistenceManager;
 import spark.managers.PersistenceManager;
-import spark.events.PopUpEvent;

 [Exclude(name="controlBarContent", kind="property")]
 [Exclude(name="controlBarGroup", kind="property")]
@@ -187,6 +189,11 @@
      */
     private var menuKeyEventPreventDefaulted:Boolean = false;

+    /**
+     *  @private
+     */
+    private var mouseShield:Sprite;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -577,7 +584,7 @@
     {
         viewMenuOpen = false;
     }
-
+
     /**
      *  @private
      */
@@ -603,6 +610,8 @@
             addEventListener(ResizeEvent.RESIZE, resizeHandler);
         }

+        // Block interaction with the rest of the application
+        attachMouseShield();
         currentViewMenu.open(this, false /*modal*/);
     }

@@ -612,7 +621,10 @@
     private function closeViewMenu():void
     {
         if (currentViewMenu)
+        {
             currentViewMenu.close();
+            removeMouseShield();
+        }
     }

     /**
@@ -661,6 +673,39 @@
         currentViewMenu.invalidateSkinState();
     }

+    /**
+     *  @private
+     *  Attaches a mouseShield to prevent interaction with the rest of the
+     *  application while the menu is open
+     */
+    mx_internal function attachMouseShield():void
+    {
+        if (skin)
+        {
+            mouseShield = new Sprite();
+
+            var g:Graphics = mouseShield.graphics;
+            g.beginFill(0,0);
+            g.drawRect(0,0,getLayoutBoundsWidth(), getLayoutBoundsHeight());
+            g.endFill();
+
+            skin.addChild(mouseShield);
+        }
+    }
+
+    /**
+     *  @private
+     *  Removes the mouseShield
+     */
+    mx_internal function removeMouseShield():void
+    {
+        if (mouseShield && skin)
+        {
+            skin.removeChild(mouseShield);
+            mouseShield = null;
+        }
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Overridden methods: UIComponent


abort requet on load

abort requet on load

--- src/org/hola/JSURLStream.as
+++ src/org/hola/JSURLStream.as
@@ -92,7 +92,10 @@
             if (_hola_managed || _self_load)
             {
                 if (reqs[_req_id])
+                {
+                    delete reqs[_req_id];
                     _trigger('abortFragment', {req_id: _req_id});
+                }
                 WorkerUtils.removeEventListener(HEvent.WORKER_MESSAGE, onmsg);
             }
             if (super.connected)
@@ -101,7 +104,15 @@
         }

         override public function load(request : URLRequest) : void {
-            // XXX arik: cleanup previous if hola mode changed
+            if (_hola_managed || _self_load)
+            {
+                if (reqs[_req_id])
+                {
+                    delete reqs[_req_id];
+                    _trigger('abortFragment', {req_id: _req_id});
+                }
+                WorkerUtils.removeEventListener(HEvent.WORKER_MESSAGE, onmsg);
+            }
             _hola_managed = HSettings.enabled && ZExternalInterface.avail();
             req_count++;
             _req_id = 'req'+req_count;


Transferred from the Adobe Open Source Subversion Repository

Revision: 9715
Author:   aharui@adobe.com
Date:     2009-08-27T21:20:28.280781Z

Log Message:
-----------
Introduce tabFocusEnabled to IFocusManagerComponent.  This replaces tabEnabled as the way to remove a component from the tabbing loop.  tabEnabled should be set to true for any component that can receive focus, and tabFocusEnabled determines whether the FocusManager will actually give it focus.  If tabEnabled=false on a non-TextField, the player will sometimes momentarily remove focus and dispatch a focusOut when the component has focus and is later clicked on.  This is now quite common with TLF-based text components so we are forced to make this change.

QE Notes: tests using tabEnabled must now use tabFocusEnabled
Doc Notes: needs documentation
Bugs: SDK-22731
Reviewer: Gordon
API Change: Yes
Is noteworthy for integration: Yes
tests: checkintests cyclone

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.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/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.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/core/Container.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/Image.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>

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

--- frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as
+++ frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as
@@ -51,7 +51,7 @@
 	 *  on the child component.

 	 *
 	 *
This will cause the FocusManager to ignore this component
-	 *  and not monitor it for changes to the tabEnabled,
+	 *  and not monitor it for changes to the tabFocusEnabled,
 	 *  hasFocusableChildren, and mouseFocusEnabled properties.
 	 *  This also means you cannot change this value after
 	 *  addChild() and expect the FocusManager to notice.

@@ -129,7 +129,7 @@
 	function get mouseFocusEnabled():Boolean;

 	//----------------------------------
-	//  tabEnabled
+	//  tabFocusEnabled
 	//----------------------------------

 	/**
@@ -137,21 +137,23 @@
 	 *  moves focus to this component.
 	 *  Even if false, you can still be given focus
 	 *  by being selected with the mouse or via a call to
-	 *  setFocus()
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	function get tabEnabled():Boolean;
+	 *  setFocus().  This property replaces
+     *  InteractiveObject.tabEnabled which must be set to true
+     *  in Flex apps.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
+	 */
+	function get tabFocusEnabled():Boolean;

 	//----------------------------------
 	//  tabIndex
 	//----------------------------------

 	/**
-	 *  If tabEnabled, the order in which the component receives focus.
+	 *  If tabFocusEnabled, the order in which the component receives focus.
 	 *  If -1, then the component receives focus based on z-order.
 	 *
 	 *  @langversion 3.0


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

--- frameworks/projects/mx/src/mx/controls/sliderClasses/SliderDirection.as
+++ frameworks/projects/mx/src/mx/controls/sliderClasses/SliderDirection.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.controls.sliderClasses
 {


update comment

update comment

--- src/TestRunner.as
+++ src/TestRunner.as
@@ -1,4 +1,3 @@
-
 /*
  * Copyright 2008 Adobe Systems Inc., 2008 Google Inc.
  *


media picker select button disabled when navigating away from an selectable item

--- flexEditor/src/org/arisgames/editor/view/ItemEditorMediaPickerView.as
+++ flexEditor/src/org/arisgames/editor/view/ItemEditorMediaPickerView.as
@@ -301,6 +301,7 @@
             if (event.item.@label == AppConstants.MEDIATYPE_UPLOADNEW)
             {
                 trace("It's an Upload Item");
+				selectButton.enabled = false;
                 var de:DynamicEvent = new DynamicEvent(AppConstants.DYNAMICEVENT_CLOSEMEDIAPICKER);
                 AppDynamicEventManager.getInstance().dispatchEvent(de);
                 this.displayMediaUploader();
@@ -311,6 +312,9 @@
 				selectButton.enabled = true;
             }
         }
+		else {
+			selectButton.enabled = false;
+		}
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18997
Author:   smgilson@adobe.com
Date:     2010-12-03T12:34:01.997042Z

Log Message:
-----------
ASDoc updates on ViewMenu.as

QE notes:
Doc notes:
Bugs:
Reviewer:
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/ViewMenuItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as
@@ -92,13 +92,14 @@
  *  </s:View>
  *

  *
- *
Notice that you do not explicitly define the ViewMenu container.
+ *
Notice that you do not explicitly define the ViewMenu container in MXML.
  *  The ViewMenu container is created automatically
  *  to hold the ViewMenuItem controls.

  *
  *  @see spark.components.ViewMenuItem
  *  @see spark.layouts.ViewMenuLayout
  *  @see spark.components.supportClasses.ViewNavigatorApplicationBase
+ *  @see spark.skins.mobile.ViewMenuSkin
  *
  *  @langversion 3.0
  *  @playerversion AIR 2.5


Transferred from the Adobe Open Source Subversion Repository

Revision: 8271
Author:   dsubrama@adobe.com
Date:     2009-06-25T23:25:28.723385Z

Log Message:
-----------
Change the event type of List-based component's change, changing and caretChange events to a new event class: spark.events.IndexChangeEvent.

QA: Yes
Doc: Yes
Checkintests: Pass
Mustella: List/DDL/ButtonBar tests pass
Reviewers: Hans & Jason

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/DropDownListExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/ListExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/IndexChangeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/ButtonBarExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/IndexChangedEvent.as</path>

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

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

 package spark.components
-{
+{
 import flash.display.InteractiveObject;
 import flash.events.Event;
 import flash.events.EventPhase;
@@ -21,6 +21,7 @@
 import flash.ui.Keyboard;

 import spark.components.supportClasses.ListBase;
+import spark.events.IndexChangeEvent;
 import spark.events.RendererExistenceEvent;

 import mx.collections.IList;
@@ -30,7 +31,6 @@
 import mx.core.mx_internal;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
-import mx.events.IndexChangedEvent;
 import mx.managers.IFocusManagerComponent;

 use namespace mx_internal;  //ListBase and List share selection properties that are mx_internal
@@ -106,7 +106,7 @@
         tabChildren = false;
         tabEnabled = true;

-        addEventListener(IndexChangedEvent.CARET_CHANGE, caretChangeHandler);
+        addEventListener(IndexChangeEvent.CARET_CHANGE, caretChangeHandler);

         // start off with a button under the caret
         _caretIndex = 0;
@@ -468,7 +468,7 @@
         super.keyDownHandler(event);

         var oldCaretIndex:Number = caretIndex;
-        var e:IndexChangedEvent;
+        var e:IndexChangeEvent;
         var length:int = dataProvider.length;
         switch (event.keyCode)
         {
@@ -485,7 +485,7 @@
                     renderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
                     if (renderer)
                         renderer.showsCaret = true;
-                    e = new IndexChangedEvent(IndexChangedEvent.CARET_CHANGE);
+                    e = new IndexChangeEvent(IndexChangeEvent.CARET_CHANGE);
                     e.oldIndex = oldCaretIndex;
                     e.newIndex = caretIndex;
                     dispatchEvent(e);
@@ -507,7 +507,7 @@
                     renderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
                     if (renderer)
                         renderer.showsCaret = true;
-                    e = new IndexChangedEvent(IndexChangedEvent.CARET_CHANGE);
+                    e = new IndexChangeEvent(IndexChangeEvent.CARET_CHANGE);
                     e.oldIndex = oldCaretIndex;
                     e.newIndex = caretIndex;
                     dispatchEvent(e);


Transferred from the Adobe Open Source Subversion Repository

Revision: 6637
Author:   cframpto@adobe.com
Date:     2009-05-05T13:30:10.480422Z

Log Message:
-----------
Implement proxy model from SkinnableDataGroup in TextBase.  When the textView part is loaded, store all the properties in the textView.  When the textView part is unloaded, store them back in TextBase.  This eliminates the duplicate set of properties that were getting out of sync.  Text is the one exception to this since we only want to extract the text from the textFlow when it is absolutely necessary.

Fix misnamed tlf internal variable so pasting text with restrict, maxChars or displayAsPassword properties doesn't RTE.

QE Notes: all TextArea and TextInput tests pass except
Gumbo_TextInput_widthInChars_property_negative (passed in my test case so I need help from QA with this one)
Gumbo_TextInput_textView_widthInChars_5 (text needs to be revised since expected answer should be 5)
Gumbo_TextInput_textView_widthInChars_25 (test needs to be revised since expected answer should be 25)

Doc Notes:
Bugs: SDK-19980
Reviewers: Gordon

Modified Paths:
--------------
<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/primitives/RichEditableText.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/flex4/src/spark/components/TextInput.as</path>

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

--- frameworks/projects/spark/src/spark/components/TextInput.as
+++ frameworks/projects/spark/src/spark/components/TextInput.as
@@ -104,73 +104,11 @@
     //
     //--------------------------------------------------------------------------

-	//----------------------------------
-	//  widthInChars
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    private var _widthInChars:Number = 15;
-
-    /**
-     *  @private
-     */
-    private var widthInCharsChanged:Boolean = false;
-
-    /**
-     *  The default width for the TextInput, measured in characters.
-     *  The width of the "0" character is used for the calculation,
-     *  since in most fonts the digits all have the same width.
-     *  So if you set this property to 5, it will be wide enough
-     *  to let the user enter 5 digits.
-     *
-     *  @default
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get widthInChars():Number
-    {
-        return _widthInChars;
-    }
-
-    /**
-     *  @private
-     */
-    public function set widthInChars(value:Number):void
-    {
-        if (value == _widthInChars)
-            return;
-
-        _widthInChars = value;
-        widthInCharsChanged = true;
-
-        invalidateProperties();
-    }
-
     //--------------------------------------------------------------------------
     //
     //  Overridden methods
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Pushes various TextInput properties down into the RichEditableText.
-     */
-    override protected function commitProperties():void
-    {
-        super.commitProperties();
-
-        if (widthInCharsChanged)
-		{
-			textView.widthInChars = _widthInChars;
-			widthInCharsChanged = false;
-		}
-	}

     /**
      *  @private
@@ -181,14 +119,11 @@

         if (instance == textView)
         {
-            // Set the RichEditableText to allow only one line of input.
             // In default.css, the TextInput selector has a declaration
             // for lineBreak which sets it to "explicit".  It needs to be on
             // TextInput rather than RichEditableText so that if changed later it
-            // will be inherited.  It needs to be set with the default
-            // before the possibility that it is changed when TextInput is
-            // created.  In this case, setting it here, would overwrite
-            // that change.
+            // will be inherited.
+
             textView.heightInLines = 1;
             textView.multiline = false;
             textView.autoSize = false;


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

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

 package spark.events
 {


Finished implementing support for var.  Now using
StandardLib.substitute().

Change-Id: I171325a2647b381164519a958a782540c876c372

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -132,7 +132,7 @@
 		private static const PN_EXPR:String = 'EXPR';

 		/**
-		 * may only contain one expression, optionally enclosed in (), no statements.
+		 * variable names and/or assignments separated by commas
 		 * Used in conjunction with _validStatementPatterns.
 		 */
 		private static const PN_VARS:String = 'VARS';
@@ -984,7 +984,7 @@
 						return compiledString;

 					compiledObjects.unshift(compiledString);
-					return new CompiledFunctionCall(new CompiledConstant('substitute', StringUtil.substitute), compiledObjects);
+					return new CompiledFunctionCall(new CompiledConstant('substitute', StandardLib.substitute), compiledObjects);
 				}
 				else if (escapeIndex < bracketIndex) // handle '\'
 				{
@@ -1048,7 +1048,7 @@
 						throw new Error("Missing '}' in string literal inline code: " + input);

 					// now bracketIndex points to '{' and escapeIndex points to matching '}'
-					//replace code between brackets with an int like {0} so the resulting string can be passed to StringUtil.substitute() with compiledObject as the next parameter
+					//replace code between brackets with an int like {0} so the resulting string can be passed to StandardLib.substitute() with compiledObject as the next parameter
 					output += input.substring(searchIndex, bracketIndex) + '{' + compiledObjects.length + '}';
 					searchIndex = escapeIndex + 1;
 					compiledObjects.push(compileTokens(tokens, true));
@@ -1488,7 +1488,6 @@
 		{
 			var stmt:String = tokens[startIndex] as String;
 			var call:CompiledFunctionCall;
-			var i:int;

 			// stop if tokens does not start with a statement
 			if (!statements.hasOwnProperty(stmt))
@@ -1515,13 +1514,13 @@
 			// find a matching statement pattern
 			nextPattern: for each (var pattern:Array in _validStatementPatterns)
 			{
-				for (i = 0; i < pattern.length; i++)
-				{
-					if (startIndex + i >= tokens.length)
+				for (var iPattern:int = 0; iPattern < pattern.length; iPattern++)
+				{
+					if (startIndex + iPattern >= tokens.length)
 						continue nextPattern;

-					var type:String = pattern[i];
-					var token:Object = tokens[startIndex + i];
+					var type:String = pattern[iPattern];
+					var token:Object = tokens[startIndex + iPattern];
 					call = token as CompiledFunctionCall;

 					if (statements.hasOwnProperty(type) && token != type)
@@ -1542,7 +1541,7 @@

 					if (type == PN_STMT)
 					{
-						compileStatement(tokens, startIndex + i);
+						compileStatement(tokens, startIndex + iPattern);
 					}

 					if (type == PN_BLOCK)
@@ -1559,31 +1558,33 @@

 						// must be local variable/assignment or list of local variables/assignments

+						// special case for "y, x = 3;" which at this point is stored as {y, x = 3}
+						if (call.evaluatedMethod == operators[';'])
+						{
+							if (call.evaluatedParams.length != 1 || !(call.compiledParams[0] is CompiledFunctionCall))
+								throwInvalidSyntax(stmt);
+							// remove the operator ';' wrapper
+							tokens[startIndex + iPattern] = token = call = call.compiledParams[0];
+						}
+
 						// if there is only a single variable, wrap it in an operator ',' call
 						if (!call.compiledParams || call.evaluatedMethod == operators['='])
-							tokens[startIndex + i] = token = call = compileOperator(',', [call]);
+							tokens[startIndex + iPattern] = token = call = compileOperator(',', [call]);

-						// special case for "x = 3;" which becomes {x = 3}
-						if (call.evaluatedMethod == operators[';'] && call.compiledParams.length == 1)
-						{
-							call.compiledMethod = new CompiledConstant(',', operators[',']);
-							call.evaluateConstants();
-						}
-
 						if (call.evaluatedMethod != operators[','] || call.compiledParams.length == 0)
 							throwInvalidSyntax(stmt);

 						varNames = [];
-						for (var i:int = 0; i < call.compiledParams.length; i++)
+						for (var iParam:int = 0; iParam < call.compiledParams.length; iParam++)
 						{
-							var variable:CompiledFunctionCall = call.compiledParams[i] as CompiledFunctionCall;
+							var variable:CompiledFunctionCall = call.compiledParams[iParam] as CompiledFunctionCall;
 							if (!variable)
 								throwInvalidSyntax(stmt);

 							if (!variable.compiledParams) // local initialization
 							{
 								// variable initialization only -- remove from ',' params
-								call.compiledParams.splice(i--, 1);
+								call.compiledParams.splice(iParam--, 1);
 								varNames.push(variable.evaluatedMethod);
 							}
 							else if (variable.evaluatedMethod == operators['='] && variable.compiledParams.length == 2) // local assignment
@@ -1610,6 +1611,7 @@
 						call.evaluateConstants();
 						token = call;
 					}
+					originalTokens = null; // avoid infinite decompile recursion
 					tokens[startIndex] = token;
 				}
 				else if (stmt == ST_IF) // if (cond) {stmt} else {stmt}
@@ -1797,6 +1799,8 @@
 					varLookup[name] = true;
 				return null;
 			}
+
+			//todo - flatten nested operator ';' and ',' calls

 			if (method == operators[';'] || method == operators[','] || method == operators['('])
 			{
@@ -1930,7 +1934,7 @@
 					if (op == 'delete')
 						return op + ' ' + result;

-					return StringUtil.substitute("({0} {1} {2})", result, op, params[n - 1]); // example:  "(a.b = c)"
+					return StandardLib.substitute("({0} {1} {2})", result, op, params[n - 1]); // example:  "(a.b = c)"
 				}

 				// variable number of params
@@ -1959,10 +1963,10 @@
 					}

 					if (n == 2) // infix op
-						return StringUtil.substitute("({0} {1} {2})", params[0], op, params[1]);
+						return StandardLib.substitute("({0} {1} {2})", params[0], op, params[1]);

 					if (n == 3 && op == '?:') // ternary op
-						return StringUtil.substitute("({0} ? {1} : {2})", params);
+						return StandardLib.substitute("({0} ? {1} : {2})", params);
 				}

 				if (op == ST_VAR)
@@ -2366,7 +2370,8 @@
 				"i = 0; do { if (i == 3) continue; trace(i); if (i == 5) break; } while (i >= 0 && ++i < 10) trace('done');",
 				"i = -1; while (++i < 10) { if (i == 3) continue; trace(i); if (i == 5) break; } trace('done');",
 				"a = []; o = Object('a',1,'b',2,'c',3,'d',4,'e',5); for (k in o) { a.push(`{k} = {o[k]}`); o['?'+k]=k+'!'; delete o[k]; } for each (p in o) a.push(p); return [a,o];",
-				"x = 3; var x = 4; x"
+				"y = 4; x = 3; var x = 4, y; [x, y]",
+				"`abc { function(x,y) { return x+y; } } xyz`"
 			];
 			var values:Array = [-2, -1, -0.5, 0, 0.5, 1, 2];
 			var vars:Object = {};


Added compiler shortcut Class('some.qualified.ClassName').

Change-Id: Ia103e31f6845b73db8709c1717fd0d69aad085d6

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -1278,7 +1278,11 @@
 								// type casting
 								if (call.evaluatedParams.length != 1)
 									throw new Error("Incorrect number of arguments for type casting.  Expected 1.");
-								result = call.evaluatedMethod(call.evaluatedParams[0]);
+								// special case for Class('some.qualified.ClassName')
+								if (call.evaluatedMethod === Class && call.evaluatedParams[0] is String)
+									result = getDefinitionByName(call.evaluatedParams[0]);
+								else
+									result = call.evaluatedMethod(call.evaluatedParams[0]);
 							}
 							else
 							{


added try/catch

added try/catch

--- WeaveCore/src/weave/core/Synchronizer.as
+++ WeaveCore/src/weave/core/Synchronizer.as
@@ -160,7 +160,16 @@
 				{
 					if (linkableVariable is LinkableVariable)
 					{
-						if ((linkableVariable as LinkableVariable).verifyValue(bindableValue))
+						var verified:Boolean = false;
+						try
+						{
+							verified = (linkableVariable as LinkableVariable).verifyValue(bindableValue);
+						}
+						catch (e:Error)
+						{
+							trace('Error calling verifier:', e.getStackTrace());
+						}
+						if (verified)
 						{
 							// clear previous error string
 							if (uiComponent.errorString == VALUE_NOT_ACCEPTED)


Fails test that callback recieves factory and scope name as arguments

--- src/asfac.tests/src/com/thedevstop/asfac/ResolutionTests.as
+++ src/asfac.tests/src/com/thedevstop/asfac/ResolutionTests.as
@@ -137,12 +137,28 @@
 			var obj:Object = { numbers:[1, 2, 3] };
 			factory.registerInstance(obj, Object);

-			var resolveFunction:Function =function ():void
+			var resolveFunction:Function = function ():void
 			{
 				var instance:Object = factory.resolve(Object, "nonDefaultScope");
 			};

 			assertThrows(ArgumentError, resolveFunction);
 		}
+
+		public function test_should_pass_scope_name_into_callback_during_resolution():void
+		{
+			var factory:AsFactory = new AsFactory();
+
+			var scope:String = "nonDefaultScope";
+
+			var resolveFunction:Function = function (factory:AsFactory, scopeName:String):Object
+			{
+				assertEquals(scopeName, scope);
+				return new Dictionary();
+			};
+			factory.registerCallback(resolveFunction, Dictionary, scope);
+
+			var instance:Dictionary = factory.resolve(Dictionary);
+		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19073
Author:   clucier@adobe.com
Date:     2010-12-06T19:58:50.025186Z

Log Message:
-----------
Reducing some of  PriorityQueue's use of dynamic types, and reducing the number of array references, mostly to help alleviate some hot spots on iOS.

QE notes: None
Doc notes: None
Bugs: SDK-28753.
Reviewer: Glenn
Tests run: Full Cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/layoutClasses/PriorityQueue.as

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

--- frameworks/projects/framework/src/mx/managers/layoutClasses/PriorityQueue.as
+++ frameworks/projects/framework/src/mx/managers/layoutClasses/PriorityQueue.as
@@ -59,7 +59,7 @@
     /**
      *  @private
      */
-    private var arrayOfDictionaries:Array = [];
+    private var priorityBins:Array = [];

     /**
      *  @private
@@ -72,12 +72,6 @@
      *  The largest occupied index in arrayOfDictionaries.
      */
     private var maxPriority:int = -1;
-
-    /**
-     *  @private
-     *  Used to keep track of change deltas.
-     */
-    public var generation:int = 0;

     //--------------------------------------------------------------------------
     //
@@ -90,22 +84,6 @@
      */
     public function addObject(obj:Object, priority:int):void
     {
-        // If no hash exists for the specified priority, create one.
-        if (!arrayOfDictionaries[priority])
-        {
-            arrayOfDictionaries[priority] = new Object;
-            arrayOfDictionaries[priority].length = 0;
-            arrayOfDictionaries[priority].items = new Dictionary(false);
-        }
-
-        // If we don't already hold the obj in the specified hash, add it
-        // and update our item count.
-        if (arrayOfDictionaries[priority].items[obj] == null)
-        {
-            arrayOfDictionaries[priority].items[obj] = true;
-            arrayOfDictionaries[priority].length++;
-        }
-
         // Update our min and max priorities.
         if (maxPriority < minPriority)
         {
@@ -118,9 +96,28 @@
             if (priority > maxPriority)
                 maxPriority = priority;
         }
-
-        // Update our changelist id since we've added an item.
-        generation++;
+
+        var bin:PriorityBin = priorityBins[priority];
+
+        if (!bin)
+        {
+            // If no hash exists for the specified priority, create one.
+            bin = new PriorityBin();
+            priorityBins[priority] = bin;
+            bin.items[obj] = true;
+            bin.length++;
+        }
+        else
+        {
+            // If we don't already hold the obj in the specified hash, add it
+            // and update our item count.
+            if (bin.items[obj] == null)
+            {
+                bin.items[obj] = true;
+                bin.length++;
+            }
+        }
+
     }

     /**
@@ -132,31 +129,32 @@

         if (minPriority <= maxPriority)
         {
-            while (!arrayOfDictionaries[maxPriority] ||
-                   arrayOfDictionaries[maxPriority].length == 0)
+            var bin:PriorityBin = priorityBins[maxPriority];
+            while (!bin || bin.length == 0)
             {
                 maxPriority--;
                 if (maxPriority < minPriority)
                     return null;
+                bin = priorityBins[maxPriority];
             }

             // Remove the item with largest priority from our priority queue.
             // Must use a for loop here since we're removing a specific item
             // from a 'Dictionary' (no means of directly indexing).
-            for (var key:Object in arrayOfDictionaries[maxPriority].items )
+            for (var key:Object in bin.items )
             {
                 obj = key;
-                removeChild(ILayoutManagerClient(key),maxPriority);
+                removeChild(ILayoutManagerClient(key), maxPriority);
                 break;
             }

             // Update maxPriority if applicable.
-            while (!arrayOfDictionaries[maxPriority] ||
-                   arrayOfDictionaries[maxPriority].length == 0)
+            while (!bin || bin.length == 0)
             {
                 maxPriority--;
                 if (maxPriority < minPriority)
                     break;
+                bin = priorityBins[maxPriority];
             }

         }
@@ -174,7 +172,8 @@

         while (min <= max)
         {
-            if (arrayOfDictionaries[max] && arrayOfDictionaries[max].length > 0)
+            var bin:PriorityBin = priorityBins[max];
+            if (bin && bin.length > 0)
             {
                 if (max == client.nestLevel)
                 {
@@ -182,7 +181,7 @@
                     // client, no need to search the entire list, just check to see
                     // if the client exists in the queue (it would be the only item
                     // at that nestLevel).
-                    if (arrayOfDictionaries[max].items[client])
+                    if (bin.items[client])
                     {
                         removeChild(ILayoutManagerClient(client), max);
                         return client;
@@ -190,7 +189,7 @@
                 }
                 else
                 {
-                    for (var key:Object in arrayOfDictionaries[max].items )
+                    for (var key:Object in bin.items )
                     {
                         if ((key is DisplayObject) && contains(DisplayObject(client), DisplayObject(key)))
                         {
@@ -224,31 +223,32 @@

         if (minPriority <= maxPriority)
         {
-            while (!arrayOfDictionaries[minPriority] ||
-                   arrayOfDictionaries[minPriority].length == 0)
+            var bin:PriorityBin = priorityBins[minPriority];
+            while (!bin || bin.length == 0)
             {
                 minPriority++;
                 if (minPriority > maxPriority)
                     return null;
+                bin = priorityBins[minPriority];
             }

             // Remove the item with smallest priority from our priority queue.
             // Must use a for loop here since we're removing a specific item
             // from a 'Dictionary' (no means of directly indexing).
-            for (var key:Object in arrayOfDictionaries[minPriority].items )
+            for (var key:Object in bin.items )
             {
                 obj = key;
-                removeChild(ILayoutManagerClient(key),minPriority);
+                removeChild(ILayoutManagerClient(key), minPriority);
                 break;
             }

             // Update minPriority if applicable.
-            while (!arrayOfDictionaries[minPriority] ||
-                   arrayOfDictionaries[minPriority].length == 0)
+            while (!bin || bin.length == 0)
             {
                 minPriority++;
                 if (minPriority > maxPriority)
                     break;
+                bin = priorityBins[minPriority];
             }
         }

@@ -264,7 +264,8 @@

         while (min <= maxPriority)
         {
-            if (arrayOfDictionaries[min] &&  arrayOfDictionaries[min].length > 0)
+            var bin:PriorityBin = priorityBins[min];
+            if (bin && bin.length > 0)
             {
                 if (min == client.nestLevel)
                 {
@@ -272,7 +273,7 @@
                     // client, no need to search the entire list, just check to see
                     // if the client exists in the queue (it would be the only item
                     // at that nestLevel).
-                    if (arrayOfDictionaries[min].items[client])
+                    if (bin.items[client])
                     {
                         removeChild(ILayoutManagerClient(client), min);
                         return client;
@@ -280,7 +281,7 @@
                 }
                 else
                 {
-                    for (var key:Object in arrayOfDictionaries[min].items)
+                    for (var key:Object in bin.items)
                     {
                         if ((key is DisplayObject) && contains(DisplayObject(client), DisplayObject(key)))
                         {
@@ -311,15 +312,11 @@
     public function removeChild(client:ILayoutManagerClient, level:int=-1):Object
     {
         var priority:int = (level >= 0) ? level : client.nestLevel;
-        if (arrayOfDictionaries[priority] &&
-            arrayOfDictionaries[priority].items[client] != null)
-        {
-            delete arrayOfDictionaries[priority].items[client];
-            arrayOfDictionaries[priority].length--;
-
-            // Update our changelist id since we've removed an item.
-            generation++;
-
+        var bin:PriorityBin = priorityBins[priority];
+        if (bin && bin.items[client] != null)
+        {
+            delete bin.items[client];
+            bin.length--;
             return client;
         }
         return null;
@@ -330,10 +327,9 @@
      */
     public function removeAll():void
     {
-        arrayOfDictionaries.splice(0);
+        priorityBins.length = 0;
         minPriority = 0;
         maxPriority = -1;
-        generation += 1;
     }

     /**
@@ -373,7 +369,7 @@
         var i:int = Math.max(minPriority, level);
         for (; i <= maxPriority; i++)
         {
-            var obj:Object = arrayOfDictionaries[i];
+            var obj:PriorityBin = priorityBins[i];
             if (obj)
             {
                 var items:Dictionary = obj.items;
@@ -399,7 +395,11 @@
      */
     private function addDictionary(d:Dictionary, length:int, priority:int):void
     {
-        arrayOfDictionaries[priority] = { length: length, items: d };
+        var bin:PriorityBin = new PriorityBin();
+        bin.length = length;
+        bin.items = d;
+        priorityBins[priority] = bin;
+
         // Update our min and max priorities.
         if (maxPriority < minPriority)
         {
@@ -416,3 +416,16 @@
 }

 }
+
+import flash.utils.Dictionary;
+
+/**
+ *  Represents one priority bucket of entries.
+ *  @private
+ */
+class PriorityBin
+{
+    public var length:int;
+    public var items:Dictionary = new Dictionary();
+
+}


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

--- frameworks/projects/advancedgrids/src/mx/styles/metadata/TextStyles.as
+++ frameworks/projects/advancedgrids/src/mx/styles/metadata/TextStyles.as
@@ -1,24 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/**
- *  Color of text in the component, including the component label.
- *
- *  @default 0x0B333C
- *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Flex 3
- */
+
 [Style(name="color", type="uint", format="Color", inherit="yes")]

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

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:
--------------
663 paths were modified

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

--- frameworks/projects/mx/src/mx/containers/gridClasses/GridColumnInfo.as
+++ frameworks/projects/mx/src/mx/containers/gridClasses/GridColumnInfo.as
@@ -34,6 +34,11 @@

 	/**
 	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function GridColumnInfo()
 	{
@@ -59,6 +64,11 @@
 	/**
 	 *  Output: the actual position of each column,
 	 *  as determined by updateDisplayList().
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var x:Number;
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8959
Author:   jszeto@adobe.com
Date:     2009-07-31T17:55:21.030388Z

Log Message:
-----------
http://bugs.adobe.com/jira/browse/SDK-22152 - Calling ensureIndexIsVisible() on Spark DropDownList is unpredictable if an item is selected

In this bug, the VScrollBar’s value starts off at 8960, is set to 220, and then set back to 8960 all before a layout pass is run.  This exposed a bug in Range where programmatically setting the value to  new value and then back to the original value resulted in the wrong value.

The fix is to check for the value setter to compare the new value against “value” instead of “_value”.

QE notes: Add test to Range components
Doc notes: None
Bugs: SDK-22152
Reviewer: Hans
Tests run: NumericStepper, Slider, ScrollBar
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/Range.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/Range.as
@@ -245,7 +245,7 @@
      */
     public function set value(newValue:Number):void
     {
-        if (newValue == _value)
+        if (newValue == value)
             return;
         _changedValue = newValue;
         valueChanged = true;


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

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

 package mx.skins.spark
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 13129
Author:   smgilson@adobe.com
Date:     2009-12-21T21:50:37.238504Z

Log Message:
-----------
ASDoc bug fixes, and added a note that Scroller no longer has a default value of hasFocusableChildren="false" and focusEnabled="true"

QE notes: -
Doc notes: -
Bugs: - FLEXDOCS-386
Reviewer: -
Tests run: - checkintests
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/framework/src/mx/events/VideoEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/interpolation/MultiValueInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/mx/src/mx/events/VideoEvent.as
+++ frameworks/projects/mx/src/mx/events/VideoEvent.as
@@ -38,7 +38,7 @@
     //  Class constants
     //
     //--------------------------------------------------------------------------
-
+
     /**
      *  The value of the VideoDisplay.state property
      *  immediately after a call to the
@@ -52,16 +52,16 @@
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
-     */
-	public static const BUFFERING:String = "buffering";
-
-	/**
-	 *  The VideoEvent.CLOSE constant defines the value of the
-	 *  type property of the event object for a close event.
-	 *
-     *
The properties of the event object have the following values:

-	 *

-	 *
Property	Value

+     */
+    public static const BUFFERING:String = "buffering";
+
+    /**
+     *  The VideoEvent.CLOSE constant defines the value of the
+     *  type property of the event object for a close event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

      *
bubbles	false

      *
cancelable	false

      *
currentTarget	The Object that defines the
@@ -79,24 +79,24 @@
      *       it is not always the Object listening for the event.
      *       Use the currentTarget property to always access the
      *       Object listening for the event.

-	 *

-	 *
-	 *  @eventType close
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public static const CLOSE:String = "close";
-
-    /**
-	 *  The VideoEvent.COMPLETE constant defines the value of the
-	 *  type property of the event object for a complete event.
-	 *
-     *
The properties of the event object have the following values:

-	 *

-	 *
Property	Value

+     *

+     *
+     *  @eventType close
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public static const CLOSE:String = "close";
+
+    /**
+     *  The VideoEvent.COMPLETE constant defines the value of the
+     *  type property of the event object for a complete event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

      *
bubbles	false

      *
cancelable	false

      *
currentTarget	The Object that defines the
@@ -114,9 +114,9 @@
      *       it is not always the Object listening for the event.
      *       Use the currentTarget property to always access the
      *       Object listening for the event.

-	 *

-	 *
-	 *  @eventType complete
+     *

+     *
+     *  @eventType complete
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -132,9 +132,9 @@
      *  the video stream is not found, or for other reasons.
      *
      *
This is a unresponsive state. If the control is unresponsive, calls to the
-	 *  play(), load(), stop(),
-	 *  and pause() methods are queued,
-	 *  and then executed when the control changes to the responsive state.

+     *  play(), load(), stop(),
+     *  and pause() methods are queued,
+     *  and then executed when the control changes to the responsive state.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -142,7 +142,7 @@
      *  @productversion Flex 3
      */
     public static const CONNECTION_ERROR:String = "connectionError";
-
+
     /**
      *  The value of the VideoDisplay.state property
      *  when the video stream has timed out or is idle.
@@ -156,7 +156,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public static const DISCONNECTED:String = "disconnected";
+    public static const DISCONNECTED:String = "disconnected";

     /**
      *  The value of the VideoDisplay.state property
@@ -165,9 +165,9 @@
      *  this state; it is for internal use only.
      *
      *
This is a unresponsive state. If the control is unresponsive, calls to the
-	 *  play(), load(), stop(),
-	 *  and pause() methods are queued,
-	 *  and then executed when the control changes to the responsive state.

+     *  play(), load(), stop(),
+     *  and pause() methods are queued,
+     *  and then executed when the control changes to the responsive state.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -182,9 +182,9 @@
      *  play() or load() method.
      *
      *
This is a unresponsive state. If the control is unresponsive, calls to the
-	 *  play(), load(), stop(),
-	 *  and pause() methods are queued,
-	 *  and then executed when the control changes to the responsive state.

+     *  play(), load(), stop(),
+     *  and pause() methods are queued,
+     *  and then executed when the control changes to the responsive state.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -192,7 +192,7 @@
      *  @productversion Flex 3
      */
     public static const LOADING:String = "loading";
-
+
     /**
      *  The value of the VideoDisplay.state property
      *  when an FLV file is loaded, but play is paused.
@@ -211,12 +211,12 @@
     public static const PAUSED:String = "paused";

     /**
-	 *  The VideoEvent.PLAYHEAD_UPDATE constant defines the value of the
-	 *  type property of the event object for a playheadUpdate event.
-	 *
-     *
The properties of the event object have the following values:

-	 *

-	 *
Property	Value

+     *  The VideoEvent.PLAYHEAD_UPDATE constant defines the value of the
+     *  type property of the event object for a playheadUpdate event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

      *
bubbles	false

      *
cancelable	false

      *
currentTarget	The Object that defines the
@@ -234,9 +234,9 @@
      *       it is not always the Object listening for the event.
      *       Use the currentTarget property to always access the
      *       Object listening for the event.

-	 *

-	 *
-	 *  @eventType playheadUpdate
+     *

+     *
+     *  @eventType playheadUpdate
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -259,16 +259,16 @@
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
-     */
+     */
     public static const PLAYING:String = "playing";

     /**
-	 *  The VideoEvent.READY constant defines the value of the
-	 *  type property of the event object for a ready event.
-	 *
-     *
The properties of the event object have the following values:

-	 *

-	 *
Property	Value

+     *  The VideoEvent.READY constant defines the value of the
+     *  type property of the event object for a ready event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

      *
bubbles	false

      *
cancelable	false

      *
currentTarget	The Object that defines the
@@ -286,15 +286,15 @@
      *       it is not always the Object listening for the event.
      *       Use the currentTarget property to always access the
      *       Object listening for the event.

-	 *

-	 *
-	 *  @eventType ready
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
+     *

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

     /**
@@ -302,9 +302,9 @@
      *  when the VideoDisplay control is resizing.
      *
      *
This is a unresponsive state. If the control is unresponsive, calls to the
-	 *  play(), load(), stop(),
-	 *  and pause() methods are queued,
-	 *  and then executed when the control changes to the responsive state.

+     *  play(), load(), stop(),
+     *  and pause() methods are queued,
+     *  and then executed when the control changes to the responsive state.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -312,14 +312,14 @@
      *  @productversion Flex 3
      */
     public static const RESIZING:String = "resizing";
-
-    /**
-	 *  The VideoEvent.REWIND constant defines the value of the
-	 *  type property of the event object for a rewind event.
-	 *
-     *
The properties of the event object have the following values:

-	 *

-	 *
Property	Value

+
+    /**
+     *  The VideoEvent.REWIND constant defines the value of the
+     *  type property of the event object for a rewind event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

      *
bubbles	false

      *
cancelable	false

      *
currentTarget	The Object that defines the
@@ -337,15 +337,15 @@
      *       it is not always the Object listening for the event.
      *       Use the currentTarget property to always access the
      *       Object listening for the event.

-	 *

-	 *
-	 *  @eventType rewind
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
+     *

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

     /**
@@ -355,9 +355,9 @@
      *  STOPPED.
      *
      *
This is a unresponsive state. If the control is unresponsive, calls to the
-	 *  play(), load(), stop(),
-	 *  and pause() methods are queued,
-	 *  and then executed when the control changes to the responsive state.

+     *  play(), load(), stop(),
+     *  and pause() methods are queued,
+     *  and then executed when the control changes to the responsive state.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -365,31 +365,31 @@
      *  @productversion Flex 3
      */
     public static const REWINDING:String = "rewinding";
-
+
     /**
      *  The value of the VideoDisplay.state property
      *  for a seek occurring
      *  due to the VideoDisplay.playHeadTime property being set.
      *
      *
This is a unresponsive state. If the control is unresponsive, calls to the
-	 *  play(), load(), stop(),
-	 *  and pause() methods are queued,
-	 *  and then executed when the control changes to the responsive state.

-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static const SEEKING:String = "seeking";
+     *  play(), load(), stop(),
+     *  and pause() methods are queued,
+     *  and then executed when the control changes to the responsive state.

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

     /**
-	 *  The VideoEvent.STATE_CHANGE constant defines the value of the
-	 *  type property of the event object for a stateChange event.
-	 *
-     *
The properties of the event object have the following values:

-	 *

-	 *
Property	Value

+     *  The VideoEvent.STATE_CHANGE constant defines the value of the
+     *  type property of the event object for a stateChange event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

      *
bubbles	false

      *
cancelable	false

      *
currentTarget	The Object that defines the
@@ -407,15 +407,15 @@
      *       it is not always the Object listening for the event.
      *       Use the currentTarget property to always access the
      *       Object listening for the event.

-	 *

-	 *
-	 *  @eventType stateChange
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
+     *

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

     /**
@@ -432,7 +432,7 @@
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
-     */
+     */
     public static const STOPPED:String = "stopped";

     //--------------------------------------------------------------------------
@@ -442,48 +442,48 @@
     //--------------------------------------------------------------------------

     /**
-	 *  Constructor.
-	 *
-	 *  @param type The event type; indicates the action that caused the event.
-	 *
-	 *  @param bubbles Specifies whether the event can bubble up the display list hierarchy.
-	 *
-	 *  @param cancelable Specifies whether the behavior associated with
-	 *  the event can be prevented.
-	 *
-	 *  @param state The value of the VideoDisplay.state property
-	 *  when the event occurs.
-	 *
-	 *  @param playeheadTime The location of the playhead when the event occurs.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-	public function VideoEvent(type:String, bubbles:Boolean = false,
-							   cancelable:Boolean = false,
-							   state:String = null, playheadTime:Number = NaN)
-	{
-		super(type, bubbles, cancelable);
-
-		this.state = state;
-		this.playheadTime = playheadTime;
-	}
-
+     *  Constructor.
+     *
+     *  @param type The event type; indicates the action that caused the event.
+     *
+     *  @param bubbles Specifies whether the event can bubble up the display list hierarchy.
+     *
+     *  @param cancelable Specifies whether the behavior associated with
+     *  the event can be prevented.
+     *
+     *  @param state The value of the VideoDisplay.state property
+     *  when the event occurs.
+     *
+     *  @param playeheadTime The location of the playhead when the event occurs.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function VideoEvent(type:String, bubbles:Boolean = false,
+                               cancelable:Boolean = false,
+                               state:String = null, playheadTime:Number = NaN)
+    {
+        super(type, bubbles, cancelable);
+
+        this.state = state;
+        this.playheadTime = playheadTime;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------

-	//----------------------------------
+    //----------------------------------
     //  playheadTime
     //----------------------------------

     /**
-	 *  The location of the playhead of the VideoDisplay control
-	 *  when the event occurs.
+     *  The location of the playhead of the VideoDisplay control
+     *  when the event occurs.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -492,57 +492,57 @@
      */
     public var playheadTime:Number;

-	//----------------------------------
+    //----------------------------------
     //  state
     //----------------------------------

     /**
-	 *  The value of the VideoDisplay.state property
-	 *  when the event occurs.
-	 *
-	 *  @see mx.controls.VideoDisplay#state
+     *  The value of the VideoDisplay.state property
+     *  when the event occurs.
+     *
+     *  @see mx.controls.VideoDisplay#state
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public var state:String;
-
-	//----------------------------------
+    public var state:String;
+
+    //----------------------------------
     //  stateResponsive
     //----------------------------------

-	/**
-	 *  The value of the VideoDisplay.stateResponsive property
-	 *  when the event occurs.
-	 *
-	 *  @see mx.controls.VideoDisplay#stateResponsive
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function get stateResponsive():Boolean
-	{
-		switch (state)
-		{
-			case DISCONNECTED:
-			case STOPPED:
-			case PLAYING:
-			case PAUSED:
-			case BUFFERING:
-			{
-				return true;
-			}
-
-			default:
-			{
-				return false;
-			}
-		}
-	}
+    /**
+     *  The value of the VideoDisplay.stateResponsive property
+     *  when the event occurs.
+     *
+     *  @see mx.controls.VideoDisplay#stateResponsive
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get stateResponsive():Boolean
+    {
+        switch (state)
+        {
+            case DISCONNECTED:
+            case STOPPED:
+            case PLAYING:
+            case PAUSED:
+            case BUFFERING:
+            {
+                return true;
+            }
+
+            default:
+            {
+                return false;
+            }
+        }
+    }

     //--------------------------------------------------------------------------
     //
@@ -551,13 +551,13 @@
     //--------------------------------------------------------------------------

     /**
-	 *  @private
-     */
-	override public function clone():Event
-	{
-		return new VideoEvent(type, bubbles, cancelable,
-							  state, playheadTime);
-	}
+     *  @private
+     */
+    override public function clone():Event
+    {
+        return new VideoEvent(type, bubbles, cancelable,
+                              state, playheadTime);
+    }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18941
Author:   deeptika@adobe.com
Date:     2010-12-02T07:27:40.830630Z

Log Message:
-----------
Obtaining array length again if array has changed

QE notes:
Doc notes:
Bugs: FLEXENT-1376 (SkinnableContainerTabularData.as - flattenArray: ignoring of elemnts of the array)
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableDataContainerTabularData.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableContainerTabularData.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableDataContainerTabularData.as
+++ frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableDataContainerTabularData.as
@@ -214,6 +214,7 @@

 					a = tmp;
 					i = -1;
+					n = a.length;
 				}
 			}
 			return a;


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

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

 package mx.utils
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3469
Author:   smgilson@adobe.com
Date:     2008-10-03T13:18:56.967661Z

Log Message:
-----------
Remove <blockquote> from ASDoc comments

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

Modified Paths:
--------------
<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/rpc/src/mx/rpc/wsdl/WSDLMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpMenuButton.as</path>

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

--- frameworks/projects/mx/src/mx/controls/PopUpMenuButton.as
+++ frameworks/projects/mx/src/mx/controls/PopUpMenuButton.as
@@ -406,11 +406,9 @@
      *  and localization.

      *
      *
The label function must take a single argument which is the item
-     *  in the dataProvider and return a String.

+     *  in the dataProvider and return a String, as the following example shows:

      *
-     *

-     *  labelFunction(item:Object):String
-     *

+     *
labelFunction(item:Object):String

      *
      *  @default null
      */
@@ -509,8 +507,8 @@
             {
                 selectedIndex = 0;

-				var cursor:IViewCursor = dataProvider.createCursor()
-				cursor.seek(CursorBookmark.FIRST, 0);
+                var cursor:IViewCursor = dataProvider.createCursor()
+                cursor.seek(CursorBookmark.FIRST, 0);

                 var item:* = cursor.current;

@@ -651,8 +649,8 @@
             menuEvent.menu = popUpMenu;
             menuEvent.menu.selectedIndex = selectedIndex;

-			var cursor:IViewCursor = dataProvider.createCursor();
-			cursor.seek(CursorBookmark.FIRST, selectedIndex);
+            var cursor:IViewCursor = dataProvider.createCursor();
+            cursor.seek(CursorBookmark.FIRST, selectedIndex);

             menuEvent.item =  cursor.current
             menuEvent.itemRenderer = itemRenderer;
@@ -675,8 +673,8 @@
         // Change label/icon if selectedIndex is changed programatically.
         if (popUpMenu.selectedIndex >= 0)
         {
-			var cursor:IViewCursor = dataProvider.createCursor();
-			cursor.seek(CursorBookmark.FIRST, selectedIndex);
+            var cursor:IViewCursor = dataProvider.createCursor();
+            cursor.seek(CursorBookmark.FIRST, selectedIndex);

             selectedIndex = popUpMenu.selectedIndex;
             if (labelSet)


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

--- frameworks/projects/rpc/src/mx/rpc/soap/mxml/Operation.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/mxml/Operation.as
@@ -0,0 +1,236 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.mxml
+{
+
+import mx.core.mx_internal;
+import mx.managers.CursorManager;
+import mx.messaging.events.MessageEvent;
+import mx.messaging.messages.AsyncMessage;
+import mx.messaging.messages.IMessage;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+import mx.rpc.AbstractService;
+import mx.rpc.AsyncToken;
+import mx.rpc.AsyncDispatcher;
+import mx.rpc.Fault;
+import mx.rpc.events.FaultEvent;
+import mx.rpc.mxml.Concurrency;
+import mx.rpc.mxml.IMXMLSupport;
+import mx.rpc.soap.WebService;
+import mx.rpc.soap.Operation;
+import mx.rpc.soap.mxml.WebService;
+import mx.validators.Validator;
+
+use namespace mx_internal;
+
+[ResourceBundle("rpc")]
+
+/**
+* An Operation used specifically by WebServices. An Operation is an individual method on a service. An Operation can be called either by invoking the function of the same name on the service or by accessing the Operation
+* as a property on the service and calling the send() method.
+*/
+public class Operation extends mx.rpc.soap.Operation implements IMXMLSupport
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public function Operation(webService:mx.rpc.soap.WebService = null, name:String = null)
+    {
+        super(webService, name);
+
+        this.webService = mx.rpc.soap.mxml.WebService(webService);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var resourceManager:IResourceManager =
+									ResourceManager.getInstance();
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    [Inspectable(enumeration="multiple,single,last", defaultValue="multiple", category="General")]
+    /**
+     * The concurrency for this Operation.  If it has not been explicitly set the setting from the WebService
+     * will be used.
+     */
+    public function get concurrency():String
+    {
+        if (_concurrencySet)
+        {
+            return _concurrency;
+        }
+        //else
+        return webService.concurrency;
+    }
+
+    /**
+     *  @private
+     */
+    public function set concurrency(c:String):void
+    {
+        _concurrency = c;
+        _concurrencySet = true;
+    }
+
+    override mx_internal function setService(ro:AbstractService):void
+    {
+        super.setService(ro);
+
+        webService = mx.rpc.soap.mxml.WebService(ro);
+    }
+
+
+    /**
+     * Whether this operation should show the busy cursor while it is executing.
+     * If it has not been explicitly set the setting from the WebService
+     * will be used.
+     */
+    public function get showBusyCursor():Boolean
+    {
+        if (_showBusyCursorSet)
+        {
+            return _showBusyCursor;
+        }
+        //else
+        return webService.showBusyCursor;
+    }
+
+    public function set showBusyCursor(sbc:Boolean):void
+    {
+        _showBusyCursor = sbc;
+        _showBusyCursorSet = true;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Use superclass description.
+     */
+    override public function cancel(id:String = null) : AsyncToken
+    {
+        if (showBusyCursor)
+        {
+            CursorManager.removeBusyCursor();
+        }
+        return super.cancel(id);
+    }
+
+    /**
+     * Execute the method.  Any arguments passed in will be passed along as part of the method call.  If there are
+     * no arguments passed the arguments array will be used as the source of parameters.
+     *
+     * @return the call object that can be used as part of the asynchronous completion token pattern, the same
+     *         object will be available in the result/fault events.
+     */
+    override public function send(... args:Array):AsyncToken
+    {
+        if (Concurrency.SINGLE == concurrency && (hasPendingInvocations() || activeCalls.hasActiveCalls()))
+        {
+            var token:AsyncToken = new AsyncToken(null);
+			var message:String = resourceManager.getString(
+				"rpc", "pendingCallExists");
+            var fault:Fault = new Fault("ConcurrencyError", message);
+            var faultEvent:FaultEvent = FaultEvent.createEvent(fault, token);
+            new AsyncDispatcher(dispatchRpcEvent, [faultEvent], 10);
+            return token;
+        }
+
+        return super.send.apply(null, args);
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Internal Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     * Return the id for the NetworkMonitor
+     */
+    override mx_internal function getNetmonId():String
+    {
+        return webService.id;
+    }
+
+
+    override mx_internal function invoke(message:IMessage, token:AsyncToken = null):AsyncToken
+    {
+        if (showBusyCursor)
+        {
+            CursorManager.setBusyCursor();
+        }
+
+        return super.invoke(message, token);
+    }
+
+    /*
+     * Kill the busy cursor, find the matching call object and pass it back
+     */
+    override mx_internal function preHandle(event:MessageEvent):AsyncToken
+    {
+        if (showBusyCursor)
+        {
+            CursorManager.removeBusyCursor();
+        }
+
+        var wasLastCall:Boolean = activeCalls.wasLastCall(AsyncMessage(event.message).correlationId);
+        var token:AsyncToken = super.preHandle(event);
+
+        if (Concurrency.LAST == concurrency && !wasLastCall)
+        {
+            return null;
+        }
+        //else
+        return token;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    private var _concurrency:String;
+
+	private var _concurrencySet:Boolean;
+
+	private var webService:mx.rpc.soap.mxml.WebService;
+
+	private var _showBusyCursor:Boolean;
+
+	private var _showBusyCursorSet:Boolean;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4078
Author:   jszeto@adobe.com
Date:     2008-11-12T01:41:52.278930Z

Log Message:
-----------
Add support for dataTips to Slider

SDK-16291 Implement data tip for slider

- Added new dynamic, optional skin part called "dataTip".
- Added dataTipFormatFunction, dataTipPrecision and showDataTip properties
- Added protected function positionDataTip
- Added dataTip skin part to FxHSliderSkin and FxVSliderSkin
- data tip is an IDataRenderer, so it can render any type of data

The data tip appearance is defined entirely by the skin. The position of the
data tip is calculated using a combination of the skin and the Slider controller.
The following properties were not retained from the Halo Slider:

- sliderDataTipClass (the skin part allows the developer to define the data tip type)
- dataTipStyleName (styling is defined on the skin part)
- dataTipOffset (the offset position is defined in the skin part)

SDK-16823 - Gumbo Slider does not support scroll wheel to increment / decrement value

Slider listens for scroll wheel events anywhere on or off the stage while it has focus.

QE Notes: Test new properties, functions and data tip behavior
Doc Notes: Added new properties and functions
Bugs: SDK-16291, SDK-16823
Reviewer: Glenn and Gordon

Modified Paths:
--------------
<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/FxVSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxVSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxHSliderSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/VSlider.as
+++ frameworks/projects/spark/src/spark/components/VSlider.as
@@ -12,11 +12,13 @@
 package mx.components
 {

+import flash.display.DisplayObject;
 import flash.geom.Point;

+import mx.components.baseClasses.FxSlider;
+import mx.core.UIComponent;
 import mx.layout.ILayoutItem;
 import mx.layout.LayoutItemFactory;
-import mx.components.baseClasses.FxSlider;

 [IconFile("FxVSlider.png")]

@@ -152,6 +154,26 @@
         return pointToPosition(localX, localY) + (thumbH / 2);
     }

+    /**
+     *  @private
+     */
+    override protected function positionDataTip():void
+    {
+    	var tipAsDisplayObject:DisplayObject = dataTipInstance as DisplayObject;
+
+    	if (tipAsDisplayObject)
+    	{
+			var relY:Number = thumb.y + (thumb.height - tipAsDisplayObject.height) / 2;
+	        var o:Point = new Point(dataTipOriginalPosition.x, relY);
+	        var r:Point = localToGlobal(o);
+			r = tipAsDisplayObject.parent.globalToLocal(r);
+
+			// TODO (jszeto) Change to use ILayoutItem.setActualPosition?
+        	tipAsDisplayObject.x = Math.floor(r.x < 0 ? 0 : r.x);
+        	tipAsDisplayObject.y = Math.floor(r.y < 0 ? 0 : r.y);
+    	}
+    }
+
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 11669
Author:   gosmith@adobe.com
Date:     2009-11-11T20:56:09.050685Z

Log Message:
-----------
Spark now provides localized RTE messages for TLF.

TLF is a layer below Flex and doesn't have a localization scheme like Flex's ResourceManager; it just has hard-coded English RTE messages. But it now also has a hook function (GlobalSettings.getResourceStringFunction) that higher layers like Flex can set to provide localized messages instead.

Spark.swc now has a new resource bundle named "textLayout" with these RTE messages for TLF, copied from TLF's GlobalSettings file. And Spark.swc implements the hook in TextUtil.getResourceString().

Various classes that use TLF -- such as RichText, RichEditableText, TextFlowUtils, and UIFTETextField -- set the hook function, typically in their class initialization code. UIFTETextField didn't have class init code so I just do it repeatedly in the constuctor… it's just an assignment statement and should be fast enough.

QE notes: None
Doc notes: None
Bugs: SDK-23782
Reviewer: Carol
Tests run: ant checkintests
Is noteworthy for integration: Need localization of this new resource bundle

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/fi_FI/textLayout.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/sv_SE/textLayout.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextUtil.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/ja_JP/textLayout.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/build.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/zh_TW/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/nb_NO/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/ru_RU/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/es_ES/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/fr_FR/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/de_DE/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/zh_CN/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/da_DK/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/nl_NL/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/ko_KR/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/pt_BR/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/it_IT/textLayout.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/bundles/en_US/textLayout.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextFlowUtil.as</path>

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

--- frameworks/projects/spark/src/spark/utils/TextFlowUtil.as
+++ frameworks/projects/spark/src/spark/utils/TextFlowUtil.as
@@ -17,6 +17,7 @@
 import flashx.textLayout.conversion.ITextImporter;
 import flashx.textLayout.conversion.TextConverter;
 import flashx.textLayout.elements.Configuration;
+import flashx.textLayout.elements.GlobalSettings;
 import flashx.textLayout.elements.TextFlow;
 import flashx.textLayout.formats.FormatValue;
 import flashx.textLayout.formats.ITextLayoutFormat;
@@ -105,6 +106,13 @@
     {
         if (initialized)
             return;
+
+		/**
+		 *  Set the TLF hook used for localizing runtime error messages.
+		 *  TLF itself has English-only messages,
+		 *  but higher layers like Flex can provide localized versions.
+		 */
+		GlobalSettings.getResourceStringFunction = TextUtil.getResourceString;

         var format:TextLayoutFormat;
         var config:Configuration;


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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarSkin.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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: 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@1262477 13f79535-47bb-0310-9956-ffa450edef68

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