Transferred from the Adobe Open Source Subversion Repository

Revision: 12821
Author:   klin@adobe.com
Date:     2009-12-11T01:53:44.666040Z

Log Message:
-----------
Follow-up to SDK-24574. Add try-catch block to two other places where we use bitmapData.draw(). In this case, we allow the bitmaps to remain null. In this failure case, the flag, hasBitmaps, is set and the shader in the AnimateTransitionShaderInstance is not created. This allows the effect to finish, just without input from the shader since it could not capture the bitmaps.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as
@@ -177,6 +177,13 @@
      * already on the target.
      */
     private var previousPlusShaderFilters:Array;
+
+    /**
+     *  @private
+     *  Tracks whether we have bitmaps. When we don't, we
+     *  don't create the shader and let the effect run.
+     */
+    private var hasBitmaps:Boolean = true;

     //--------------------------------------------------------------------------
     //
@@ -229,16 +236,12 @@
                  propertyChanges.start["parent"] == null))
                 if (bitmapTo)
                     bitmapFrom = new BitmapData(bitmapTo.width, bitmapTo.height, true, 0);
-                else
-                    bitmapFrom = new BitmapData(1, 1, true, 0);
         if (!bitmapTo)
             if (propertyChanges &&
                 (propertyChanges.end["visible"] == false ||
                  propertyChanges.end["parent"] == null))
                 if (bitmapFrom)
                     bitmapTo = new BitmapData(bitmapFrom.width, bitmapFrom.height, true, 0);
-                else
-                    bitmapTo = new BitmapData(1, 1, true, 0);

         // Last-ditch effort - if we don't have bitmaps yet, then just grab a
         // snapshot of the current target
@@ -246,6 +249,22 @@
             bitmapFrom = getSnapshot(target);
         if (!bitmapTo)
             bitmapTo = getSnapshot(target);
+
+        // When all efforts to get a bitmap fail, we don't create a shader.
+        if (!bitmapFrom || !bitmapTo)
+        {
+            hasBitmaps = false;
+
+            // clean up
+            if (bitmapFrom)
+                bitmapFrom.dispose();
+            else if (bitmapTo)
+                bitmapTo.dispose();
+        }
+        else
+        {
+            hasBitmaps = true;
+        }

         // Fix up the visibility if it's becoming visible
         if (propertyChanges &&
@@ -254,32 +273,37 @@
         {
             target.visible = true;
         }
-        shader = new Shader(shaderByteCode);
-        if (shader.data)
-        {
-            shader.data.from.input = bitmapFrom;
-            shader.data.to.input = bitmapTo;
-
-            motionPaths = new <MotionPath>[new MotionPath("progress")];
-            motionPaths[0].keyframes = new <Keyframe>[new Keyframe(0, 0),
-                new Keyframe(duration, 1)];
-
-            // auto-set width/height if exposed in shader
-            if ("width" in shader.data)
-                shader.data.width.value = [bitmapFrom.width];
-            if ("height" in shader.data)
-                shader.data.height.value = [bitmapFrom.height];
-            if (shaderProperties)
+
+        // Only create shader if bitmaps are present.
+        if (hasBitmaps)
+        {
+            shader = new Shader(shaderByteCode);
+            if (shader.data)
             {
-                for (var prop:String in shaderProperties)
+                shader.data.from.input = bitmapFrom;
+                shader.data.to.input = bitmapTo;
+
+                motionPaths = new <MotionPath>[new MotionPath("progress")];
+                motionPaths[0].keyframes = new <Keyframe>[new Keyframe(0, 0),
+                    new Keyframe(duration, 1)];
+
+                // auto-set width/height if exposed in shader
+                if ("width" in shader.data)
+                    shader.data.width.value = [bitmapFrom.width];
+                if ("height" in shader.data)
+                    shader.data.height.value = [bitmapFrom.height];
+                if (shaderProperties)
                 {
-                    var value:Object = shaderProperties[prop];
-                    shader.data[prop].value = (value is Array) ?
-                        value :
-                        [value];
+                    for (var prop:String in shaderProperties)
+                    {
+                        var value:Object = shaderProperties[prop];
+                        shader.data[prop].value = (value is Array) ?
+                            value :
+                            [value];
+                    }
                 }
+                shaderFilter = new ShaderFilter(shader);
             }
-            shaderFilter = new ShaderFilter(shader);
         }

         super.play();
@@ -296,10 +320,19 @@
         var bmData:BitmapData;
         var tempFilters:Array = target.filters;
         target.filters = [];
-        if (target is GraphicElement)
-            bmData = GraphicElement(target).captureBitmapData(true, 0, false);
-        else
-            bmData = BitmapUtil.getSnapshot(IUIComponent(target));
+
+        try
+        {
+            if (target is GraphicElement)
+                bmData = GraphicElement(target).captureBitmapData(true, 0, false);
+            else
+                bmData = BitmapUtil.getSnapshot(IUIComponent(target));
+        }
+        catch (e:SecurityError)
+        {
+            // Do nothing and let it return null.
+        }
+
         target.filters = tempFilters;

         return bmData;
@@ -313,6 +346,9 @@
      */
     override protected function setValue(property:String, value:Object):void
     {
+        if (!hasBitmaps)
+            return;
+
         shader.data.progress.value = [value];
         target.filters = previousPlusShaderFilters;
     }
@@ -323,6 +359,10 @@
     override public function animationStart(animation:Animation):void
     {
         super.animationStart(animation);
+
+        if (!hasBitmaps)
+            return;
+
         previousFilters = target.filters;
         previousPlusShaderFilters = [shaderFilter].concat(previousFilters);
         target.filters = previousPlusShaderFilters;
@@ -335,6 +375,9 @@
      */
     private function cleanup():void
     {
+        if (!hasBitmaps)
+            return;
+
         target.filters = previousFilters;
         previousFilters = null;
         previousPlusShaderFilters = null;
@@ -371,11 +414,16 @@
      */
     override protected function getCurrentValue(property:String):*
     {
+        // null value may cause motion path interpolation to fail,
+        // but this method generally won't be called for shader effects.
+        if (!hasBitmaps)
+            return null;
+
         return shader[property];
     }

     /**
-     * Override FXAnimate's setupStyleMapEntry to avoid the need to
+     * Override Animate's setupStyleMapEntry to avoid the need to
      * validate our properties against the 'target' (since we actually
      * set properties on our associated filter instance).
      *


remove debug call to trace() in DataBindings.remove()

--- src/aerys/minko/type/data/DataBindings.as
+++ src/aerys/minko/type/data/DataBindings.as
@@ -117,10 +117,7 @@
 			delete _providerToBindingNames[provider];

 			for each (bindingName in bindingNames)
-			{
-				trace(bindingName);
 				getPropertyChangedSignal(bindingName).execute(this, bindingName, null);
-			}
 		}

 		public function getPropertyChangedSignal(bindingName : String) : Signal


Fix issue where layerId & serviceMode properties were not being read/written from/to config XML.

--- src/com/esri/builder/model/ConfigLayer.as
+++ src/com/esri/builder/model/ConfigLayer.as
@@ -322,6 +322,8 @@
         configLayer.showInLegend = layerXML.@showinlegend[0];
         configLayer.showInLegendHiddenLayers = layerXML.@showinlegendhiddenlayers[0];
         configLayer.subDomains = layerXML.@subdomains[0];
+        configLayer.layerId = layerXML.@layerid[0];
+        configLayer.serviceMode = layerXML.@servicemode[0];

         return configLayer;
     }
@@ -519,7 +521,7 @@
         }
         if (serviceMode)
         {
-            layerXML.@mode = serviceMode;
+            layerXML.@servicemode = serviceMode;
         }
         if (style)
         {


example

example

--- src/com/kemsky/Stream.as
+++ src/com/kemsky/Stream.as
@@ -61,28 +61,29 @@
          *
          *
Creates a new stream using the specified source array.
          *  If no array is specified an empty array will be used.

+         * @example
+         *

+         *     var s:Stream = new Stream();
+         *     var s:Stream = new Stream([1, 2, 3]);
+         *

          */
         public function Stream(source:Array = null)
         {
             this.source = source == null ? [] : source;
         }
-
-// todo
-//        public function remove(index:int, count:uint = 1):Stream
-//        {
-//            source.splice.apply(null, [index, count].concat());
-//            return this;
-//        }
-//
-//        public function insert(index:int, item:*, ...rest):Stream
-//        {
-//            source.splice.apply(null, [index, 0, item].concat());
-//            return this;
-//        }

         /**
          * Creates a new stream for all items that are not strictly equal to undefined (item !== undefined).
          * @return A new stream that contains all items from the original stream that are not equal to undefined.
+         * @example
+         *

+         *     var s:Stream = new Stream();
+         *     s[0] = 1;
+         *     s[10] = 2;
+         *     var c:Stream = s.compact();
+         *     trace(c);
+         *     //Stream{1, 2}
+         *

          */
         public function compact():Stream
         {
@@ -93,6 +94,16 @@
          * Splits current stream into two streams depending on testing callback.
          * @param callback A function to run on each item of the stream: function(item:*):Boolean.
          * @return A new stream containing two streams: the first stream from items with positive test and second with negative.
+         * @example
+         *

+         *      var s:Stream = $(1, 2, 3);
+         *      var groups:Stream = s.partition(function (item:Number):Boolean
+         *      {
+         *          return item < 3;
+         *      }
+         *      trace(groups);
+         *      //Stream{Stream{1, 2}, Stream{3}}
+         *

          */
         public function partition(callback:Function):Stream
         {
@@ -119,6 +130,13 @@
          * @param value An item used to fill the stream.
          * @param length An Integer that specifies the how many items to set.
          * @return Current stream.
+         * @example
+         *

+         *     var s:Stream = $();
+         *     s.fill(1, 3);
+         *     trace(s);
+         *     //Stream{1, 1, 1}
+         *

          */
         public function fill(value:*, length:int = -1):Stream
         {
@@ -133,7 +151,13 @@

         /**
          * Creates a new stream of streams created from the items and their corresponding indices.
-         * For example: [1, 2] => [[0, 1][1, 2]].
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var z:Stream = s.zip();
+         *     trace(z);
+         *     //Stream{Stream{0, 1}, Stream{1, 2}, Stream{2, 3}}
+         *

          * @return A new stream of streams created from the items and their corresponding indices.
          */
         public function zip():Stream
@@ -153,6 +177,16 @@
          * @param callback The function to run on each item of the stream: function(item:*):Boolean.
          * @param reverse Start search from the end of the stream.
          * @return An index of the item that satisfies provided testing callback; otherwise -1 is returned.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var index:int = s.findIndex(function(item:Number):Boolean
+         *     {
+         *        return item > 1;
+         *     });
+         *     trace(index);
+         *     //1
+         *

          */
         public function findIndex(callback:Function, reverse:Boolean = false):int
         {
@@ -186,6 +220,16 @@
          * @param callback The function to run on each item of the stream: function(item:*):Boolean.
          * @param reverse
          * @return An item that satisfies provided testing callback; otherwise undefined is returned.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var item:int = s.find(function(item:Number):Boolean
+         *     {
+         *        return item > 1;
+         *     });
+         *     trace(item);
+         *     //2
+         *

          */
         public function find(callback:Function, reverse:Boolean = false):*
         {
@@ -217,6 +261,13 @@
          * Creates a new stream from items of the current stream skipping last n items.
          * @param n An integer that specifies how may items to skip.
          * @return A new stream without n last items.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var d:Stream = s.drop(2);
+         *     trace(d);
+         *     //Stream{1}
+         *

          */
         public function drop(n:uint):Stream
         {
@@ -227,6 +278,13 @@
          * Returns stream item at specified index.
          * @param index An integer that specifies the position of the item in the stream.
          * @return An item at specified position.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var item:Number = s.getItem(1);
+         *     trace(item);
+         *     //2
+         *

          */
         public function getItem(index:int):*
         {
@@ -237,6 +295,13 @@
          * Sets item at specified position.
          * @param index An integer that specifies the position in the stream where the item is to be set.
          * @param value An item to set.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     s.setItem(1, 4);
+         *     trace(s);
+         *     //Stream{1, 4, 3}
+         *

          */
         public function setItem(index:int, value:*):void
         {
@@ -247,6 +312,16 @@
          * Executes a test function on each item and calculates number of successful tests.
          * @param callback The function to run on each item in the stream.
          * @return A number of successful tests.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var count:int = s.count(function(item:Number):Boolean
+         *     {
+         *        return item > 1;
+         *     });
+         *     trace(count);
+         *     //2
+         *

          */
         public function count(callback:Function):uint
         {
@@ -266,6 +341,13 @@
          * Checks if the stream contains specified item
          * @param item An item to check.
          * @return A Boolean value of true if stream contains an item; otherwise false.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var b:Boolean = s.contains(2);
+         *     trace(b);
+         *     //true
+         *

          */
         public function contains(item:*):Boolean
         {
@@ -275,6 +357,13 @@
         /**
          * Removes all items from the stream.
          * @return Current stream.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     s.clear();
+         *     trace(s);
+         *     //Stream{}
+         *

          */
         public function clear():Stream
         {
@@ -284,6 +373,12 @@

         /**
          * Returns a Boolean value of true if Stream does not contain any items; otherwise false.
+         * @example
+         *

+         *     var s:Stream = $();
+         *     trace(s.empty);
+         *     //true
+         *

          */
         public function get empty():Boolean
         {
@@ -294,6 +389,13 @@
          * Creates a new stream that contains items starting from count index.
          * @param count A number of items to skip
          * @return A new stream that contains items starting from count index.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var c:Stream = s.skip(2);
+         *     trace(c);
+         *     //Stream{3}
+         *

          */
         public function skip(count:int):Stream
         {
@@ -302,6 +404,12 @@

         /**
          * Returns a Boolean value of true if the stream contains unique items; otherwise false.
+         * @example
+         *

+         *     var s:Stream = $(1, 1, 3);
+         *     trace(s.unique);
+         *     //false
+         *

          */
         public function get unique():Boolean
         {
@@ -311,6 +419,12 @@

         /**
          * The first item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.first);
+         *     //1
+         *

          */
         public function get first():*
         {
@@ -327,6 +441,12 @@

         /**
          * The second item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.second);
+         *     //2
+         *

          */
         public function get second():*
         {
@@ -343,6 +463,12 @@

         /**
          * The third item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.third);
+         *     //3
+         *

          */
         public function get third():*
         {
@@ -359,6 +485,12 @@

         /**
          * The fourth item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.fourth);
+         *     //4
+         *

          */
         public function get fourth():*
         {
@@ -375,6 +507,12 @@

         /**
          * The fifth item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.fifth);
+         *     //5
+         *

          */
         public function get fifth():*
         {
@@ -391,6 +529,12 @@

         /**
          * The sixth item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.sixth);
+         *     //6
+         *

          */
         public function get sixth():*
         {
@@ -407,6 +551,12 @@

         /**
          * The seventh of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.seventh);
+         *     //7
+         *

          */
         public function get seventh():*
         {
@@ -423,6 +573,12 @@

         /**
          * The eighth item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.eighth);
+         *     //8
+         *

          */
         public function get eighth():*
         {
@@ -439,6 +595,12 @@

         /**
          * The ninth item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.ninth);
+         *     //9
+         *

          */
         public function get ninth():*
         {
@@ -455,6 +617,12 @@

         /**
          * The tenth item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.tenth);
+         *     //10
+         *

          */
         public function get tenth():*
         {
@@ -471,6 +639,12 @@

         /**
          * The eleventh item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.eleventh);
+         *     //11
+         *

          */
         public function get eleventh():*
         {
@@ -484,10 +658,16 @@
         {
             source[10] = item;
         }
+
         /**
          * The twelfth item of the stream
-         */
-
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.twelfth);
+         *     //12
+         *

+         */
         public function get twelfth():*
         {
             return source[11];
@@ -503,6 +683,12 @@

         /**
          * The thirteenth item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.thirteenth);
+         *     //13
+         *

          */
         public function get thirteenth():*
         {
@@ -519,6 +705,12 @@

         /**
          * The fourteenth item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.fourteenth);
+         *     //14
+         *

          */
         public function get fourteenth():*
         {
@@ -535,6 +727,12 @@

         /**
          * The fifteenth item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.fifteenth);
+         *     //15
+         *

          */
         public function get fifteenth():*
         {
@@ -551,6 +749,12 @@

         /**
          * The last item of the stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+         *     trace(s.last);
+         *     //15
+         *

          */
         public function get last():*
         {
@@ -570,6 +774,15 @@
          * @param callback The function to execute on each value in the stream: function(item:*, accumulator:*):*.
          * @param initial The initial value for the accumulator.
          * @return The value of accumulator.
+         * @example
+         *

+         *     var sum:Number = $(0, 1, 2, 3, 4).foldLeft(function (prev:Number, current:Number):Number
+         *     {
+         *        return prev + current;
+         *     }, 0);
+         *     trace(sum);
+         *     //10
+         *

          */
         public function foldLeft(callback:Function, initial:* = undefined):*
         {
@@ -592,6 +805,15 @@
          * @param callback The function to execute on each value in the stream: function(item:*, accumulator:*):*.
          * @param initial The initial value for the accumulator.
          * @return The value of accumulator.
+         * @example
+         *

+         *     var sum:Number = $(0, 1, 2, 3, 4).foldRight(function (prev:Number, current:Number):Number
+         *     {
+         *        return prev + current;
+         *     }, 0);
+         *     trace(sum);
+         *     //10
+         *

          */
         public function foldRight(callback:Function, initial:* = undefined):*
         {
@@ -614,6 +836,13 @@
          * @param count The maximum items to take.
          * @param offset The index to start from.
          * @return A new stream that contains count of items starting from offset.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var c:Stream = s.take(2, 0);
+         *     trace(c);
+         *     //Stream{1, 2}
+         *

          */
         public function take(count:int, offset:uint = 0):Stream
         {
@@ -623,6 +852,15 @@
         /**
          * Flattens a nested Streams, ArrayLists, ArrayCollections, Vectors.
          * @return A new stream from items of the nested Streams, ArrayLists, ArrayCollections, Vectors.
+         * @example
+         *

+         *     var s:Stream = new Stream([[1], [2], [3]]);
+         *     trace(s);
+         *     //Stream{[1], [2], [3]}
+         *     var c:Stream = s.flatten();
+         *     trace(c);
+         *     //Stream{1, 2, 3}
+         *

          */
         public function flatten():Stream
         {
@@ -634,6 +872,16 @@
          * the items of the resulting Streams, ArrayLists, ArrayCollections, Vectors.
          * @param callback The function to execute on each value in the stream: function(item:*):*.
          * @return A new stream that contains flatten results of callback.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var c:Stream = s.flatMap(function(item:Number):Array
+         *     {
+         *        return [item];
+         *     });
+         *     trace(c);
+         *     //Stream{1, 2, 3}
+         *

          */
         public function flatMap(callback:Function):Stream
         {
@@ -679,9 +927,11 @@
             return new ArrayCollection(source.concat());
         }

-
         /**
          * Creates a new ArrayList from items of current Stream
+         * @example
+         *

+         *

          */
         public function list():ArrayList
         {
@@ -690,6 +940,9 @@

         /**
          * Creates a new Array from items of current Stream
+         * @example
+         *

+         *

          */
         public function array():Array
         {
@@ -701,6 +954,9 @@
          * @param property The name of the property to be used as key.
          * @param weak Create a new Dictionary with weak keys.
          * @return A new Dictionary from the current stream using specified property values as keys.
+         * @example
+         *

+         *

          */
         public function dictionary(property:String, weak:Boolean = false):Dictionary
         {
@@ -721,6 +977,9 @@
          * @param callback The function to calculate key from item: function(item:*):*
          * @param factory Class to be instantiated and returned instead of Dictionary.
          * @return A new Dictionary or custom class created from factory which contains groups.
+         * @example
+         *

+         *

          */
         public function group(callback:Function, factory:Class = null):*
         {
@@ -743,6 +1002,9 @@
          * Creates new Object from the current stream using specified property as keys
          * @param property The name of the property to be used as key.
          * @return A new Object from current Stream using specified property as keys
+         * @example
+         *

+         *

          */
         public function object(property:String):Object
         {
@@ -762,6 +1024,9 @@
          * Creates a copy of the current stream
          * @param deep Create a deep copy using AMF serialization.
          * @return A shallow copy of the current stream if deep is false; otherwise creates deep copy.
+         * @example
+         *

+         *

          */
         public function clone(deep:Boolean = false):Stream
         {
@@ -789,6 +1054,9 @@
          * @param sep used as separator
          * @return A string consisting of the items of an array converted to strings
          * and separated by the specified parameter.
+         * @example
+         *

+         *

          */
         public function join(sep:* = null):String
         {
@@ -798,6 +1066,9 @@
         /**
          * Creates reversed stream from the current one.
          * @return A new reversed stream.
+         * @example
+         *

+         *

          */
         public function reverse():Stream
         {
@@ -813,6 +1084,9 @@
          * (shallow clone) of the original stream.
          * @param rest A value of any data type (such as numbers, elements, or strings) to be concatenated in a new stream.
          * @return  A new stream that contains the items from this stream followed by items from the parameters.
+         * @example
+         *

+         *

          */
         public function concat(...rest):Stream
         {
@@ -850,6 +1124,9 @@
          * Removes the first item from a stream and returns that item.
          * The remaining stream items are moved from their original position, i, to i-1.
          * @return The first item (of any data type) in an stream.
+         * @example
+         *

+         *

          */
         public function shift():*
         {
@@ -862,6 +1139,9 @@
          * stream are moved from their original position, i, to i+1.
          * @param rest One or more numbers, elements, or variables to be inserted at the beginning of the stream.
          * @return An integer representing the new length of the stream.
+         * @example
+         *

+         *

          */
         public function unshift(...rest):uint
         {
@@ -880,6 +1160,13 @@
          *                 the starting point to the end of the stream. If endIndex is a negative number,
          *                 the ending point is specified from the end of the stream, where -1 is the last item.
          * @return A new stream that consists of a range of items from the original stream.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var c:Stream = s.slice(1, 2);
+         *     trace(c);
+         *     //Stream{2}
+         *

          */
         public function slice(startIndex:int = 0, endIndex:int = 16777215):Stream
         {
@@ -899,6 +1186,15 @@
          * @param values An optional list of one or more comma-separated values to insert into the stream
          *               at the position specified in the startIndex parameter.
          * @return  A new stream containing the items that were removed from the original stream.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var c:Stream = s.splice(1, 1);
+         *     trace(s);
+         *     //Stream{1, 3}
+         *     trace(c);
+         *     //Stream{2}
+         *

          */
         public function splice(startIndex:int, deleteCount:uint, ... values):Stream
         {
@@ -909,6 +1205,18 @@
          * Sorts the elements in a stream. This method sorts according to Unicode values. (ASCII is a subset of Unicode.)
          * @param rest The arguments specifying a comparison function and one or more values that determine the behavior of the sort.
          * @return The return value depends on whether you pass any arguments.
+         * @see com.kemsky.Stream#CASEINSENSITIVE
+         * @see com.kemsky.Stream#NUMERIC
+         * @see com.kemsky.Stream#DESCENDING
+         * @see com.kemsky.Stream#RETURNINDEXEDARRAY
+         * @see com.kemsky.Stream#UNIQUESORT
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     s.sort(Stream.DESCENDING);
+         *     trace(s);
+         *     //Stream{3, 2, 1}
+         *

          */
         public function sort(...rest):Stream
         {
@@ -941,6 +1249,14 @@
          * @see com.kemsky.Stream#DESCENDING
          * @see com.kemsky.Stream#RETURNINDEXEDARRAY
          * @see com.kemsky.Stream#UNIQUESORT
+         *
+         * @example
+         *

+         *     var s:Stream = $({id:1, price: 0}, {id:2, price: 1}, {id:3, price: 2});
+         *     s.sortOn("price", Stream.DESCENDING);
+         *     trace(s);
+         *     //Stream{{id:3, price: 2}, {id:2, price: 1}, {id:1, price: 0}}
+         *

          */
         public function sortOn(names:Object, options:Object = null):*
         {
@@ -962,7 +1278,14 @@
          * Searches for an item in an stream by using strict equality (===) and returns the index position of the item.
          * @param item The item to find in the stream.
          * @param fromIndex The location in the stream from which to start searching for the item.
-         * @return A zero-based index position of the item in the stream. If the searchElement argument is not found, the return value is -1.
+         * @return A zero-based index position of the item in the stream. If the searchElement
+         * argument is not found, the return value is -1.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     trace(s.indexOf(2));
+         *     //1
+         *

          */
         public function indexOf(item:*, fromIndex:* = 0):int
         {
@@ -976,7 +1299,14 @@
          * @param fromIndex  The location in the stream from which to start searching for the item.
          *                   The default is the maximum value allowed for an index.
          *                   If you do not specify fromIndex, the search starts at the last item in the stream.
-         * @return A zero-based index position of the item in the stream. If the searchElement argument is not found, the return value is -1.
+         * @return A zero-based index position of the item in the stream. If the searchElement
+         * argument is not found, the return value is -1.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3, 2);
+         *     trace(s.lastIndexOf(2));
+         *     //3
+         *

          */
         public function lastIndexOf(item:*, fromIndex:* = 2147483647):int
         {
@@ -990,7 +1320,18 @@
          * having values less than a particular number.
          * @param callback The function to run on each item in the stream.
          *
function(item:*):Boolean

-         * @return A Boolean value of true if all items in the stream return true for the specified function; otherwise, false.
+         * @return A Boolean value of true if all items in the stream return true for
+         * the specified function; otherwise, false.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var c:Boolean = s.every(function(item:Number):Boolean
+         *     {
+         *        return item < 3;
+         *     });
+         *     trace(c);
+         *     //false
+         *

          */
         public function every(callback:Function):Boolean
         {
@@ -1007,6 +1348,16 @@
          * @param callback The function to run on each item in the stream.
          *
function(item:*):Boolean

          * @return A new stream that contains all items from the original stream that returned true.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var c:Stream = s.filter(function(item:Number):Boolean
+         *     {
+         *        return item < 3;
+         *     });
+         *     trace(c);
+         *     //Stream{1, 2}
+         *

          */
         public function filter(callback:Function):Stream
         {
@@ -1021,6 +1372,17 @@
          * @param callback The function to run on each item in the stream.
          *
function(item:*):void

          * @return Current stream
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     s.forEach(function(item:Number):void
+         *     {
+         *         trace(item);
+         *     });
+         *     //1
+         *     //2
+         *     //3
+         *

          */
         public function forEach(callback:Function):Stream
         {
@@ -1038,6 +1400,16 @@
          * @param callback The function to run on each item in the stream.
          *
function(item:*):Boolean

          * @return A new stream that contains the results of the function on each item in the original stream.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var c:Stream = s.map(function(item:Number):Array
+         *     {
+         *        return [item];
+         *     });
+         *     trace(c);
+         *     //Stream{[1], [2], [3]}
+         *

          */
         public function map(callback:Function):Stream
         {
@@ -1053,7 +1425,18 @@
          * stream meet a criterion, such as having a value less than a particular number.
          * @param callback The function to run on each item in the stream.
          *
function(item:*):Boolean

-         * @return  A Boolean value of true if any items in the stream return true for the specified function; otherwise false.
+         * @return  A Boolean value of true if any items in the stream return true for
+         * the specified function; otherwise false.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     var c:Boolean = s.some(function(item:Number):Boolean
+         *     {
+         *        return item > 2;
+         *     });
+         *     trace(c);
+         *     //true
+         *

          */
         public function some(callback:Function):Boolean
         {
@@ -1067,6 +1450,13 @@
          * Adds one or more items to the end of a stream and returns the new length of the stream.
          * @param rest One or more values to append to the stream.
          * @return An integer representing the new length of the stream.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     s.push(4);
+         *     trace(s);
+         *     //Stream{1, 2, 3, 4}
+         *

          */
         public function push(...rest):uint
         {
@@ -1076,6 +1466,12 @@
         /**
          * Removes the last item from a stream and returns the value of that item.
          * @return The value of the last item (of any data type) in the specified stream.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     trace(s.pop());
+         *     //3
+         *

          */
         public function pop():*
         {
@@ -1091,12 +1487,21 @@
          *
          * Note: If you assign a value to the length property that is shorter
          * than the existing length, the stream will be truncated.
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     trace(s.length);
+         *     //3
+         *

          */
         public function get length():int
         {
             return source.length;
         }

+        /**
+         * @private
+         */
         public function set length(value:int):void
         {
             source.length = value;
@@ -1272,6 +1677,7 @@
         }

         /**
+         * @private
          * A class implements this method to decode itself from a data stream by calling
          * the methods of the IDataInput interface. This method must read the values in
          * the same sequence and with the same types as were written by the writeExternal() method.
@@ -1284,6 +1690,7 @@
         }

         /**
+         * @private
          * A class implements this method to encode itself for a data stream by calling
          * the methods of the IDataOutput interface.
          * @param output The name of the class that implements the IDataOutput interface.
@@ -1297,6 +1704,12 @@
         /**
          * Returns the string representation of stream object.
          * @return a String
+         * @example
+         *

+         *     var s:Stream = $(1, 2, 3);
+         *     trace(s.toString());
+         *     //Stream{1, 2, 3}
+         *

          */
         public function toString():String
         {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 21930
Author:   aaltman@adobe.com
Date:     2011-08-11T00:21:08.212572Z

Log Message:
-----------
ASDoc updates for StyleableStageText and SkinnableTextBase

QE notes: None
Doc notes: None
Bugs: SDK-31109, SDK-31107
Reviewer: cframpto
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
@@ -217,7 +217,7 @@

 /**
  *  Determines whether the text is boldface.
- *  Recognized values are normal and bold.
+ *  Recognized values are "normal" and "bold".
  *
  *  @default "normal"
  *
@@ -241,9 +241,9 @@
 [Style(name="textAlign", type="String", enumeration="left,center,right", inherit="yes")]

 /**
- *  The StageTextField class is a text primitive for use in ActionScript skins.
- *  It cannot be used in MXML markup and is not compatible with effects or the
- *  subset of styles enumerated above.
+ *  The StyleableStageText class is a text primitive for use in ActionScript
+ *  skins. It cannot be used in MXML markup, is not compatible with effects, and
+ *  is not compatible with transformations such as rotation, scale, and skew.
  *
  *  @see flash.text.StageText
  *
@@ -403,11 +403,7 @@
     private var invalidateEffectiveEnabledFlag:Boolean = true;

     /**
-     *  @copy mx.core.UIComponent#enabled
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override public function set enabled(value:Boolean):void
     {
@@ -450,11 +446,7 @@
     //----------------------------------

     /**
-     *  @copy flash.display.DisplayObject#height
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override public function get height():Number
     {
@@ -474,7 +466,7 @@
         if (!localViewPort)
             localViewPort = new Rectangle();

-        localViewPort.height = value;
+        localViewPort.height = Math.max(0, value);

         invalidateViewPortFlag = true;
         invalidateProperties();
@@ -485,16 +477,12 @@
     //----------------------------------

     /**
-     * Storage for the visible property.
+     *  Storage for the visible property.
      */
     private var _visible:Boolean = true;

     /**
-     *  @copy flash.display.DisplayObject#visible
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override public function get visible():Boolean
     {
@@ -519,11 +507,7 @@
     //----------------------------------

     /**
-     *  @copy flash.display.DisplayObject#width
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override public function get width():Number
     {
@@ -543,7 +527,7 @@
         if (!localViewPort)
             localViewPort = new Rectangle();

-        localViewPort.width = value;
+        localViewPort.width = Math.max(0, value);

         invalidateViewPortFlag = true;
         invalidateProperties();
@@ -554,11 +538,7 @@
     //----------------------------------

     /**
-     *  @copy flash.display.DisplayObject#x
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override public function get x():Number
     {
@@ -589,11 +569,7 @@
     //----------------------------------

     /**
-     *  @copy flash.display.DisplayObject#y
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override public function get y():Number
     {
@@ -1001,15 +977,7 @@
     private var _autoCapitalize:String = AutoCapitalize.NONE;

     /**
-     *  @private
-     *  Hint indicating what captialization behavior soft keyboards should use.
-     *
-     *  Supported values are defined in flash.text.AutoCapitalize:
-     *      "none" - no automatic capitalization
-     *      "word" - capitalize the first letter following any space or
-     *          punctuation
-     *      "sentence" - captitalize the first letter following any period
-     *      "all" - capitalize every letter
+     *  @copy flash.text.StageText#autoCapitalize
      *
      *  @langversion 3.0
      *  @playerversion AIR 3.0
@@ -1041,9 +1009,7 @@
     private var _autoCorrect:Boolean = true;

     /**
-     *  @private
-     *  Hint indicating whether a soft keyboard should use its auto-correct
-     *  behavior, if supported.
+     *  @copy flash.text.StageText#autoCorrect
      *
      *  @langversion 3.0
      *  @playerversion AIR 3.0
@@ -1072,17 +1038,7 @@
     private var _returnKeyLabel:String = ReturnKeyLabel.DEFAULT;

     /**
-     *  @private
-     *  Hint indicating what label should be displayed for the return key on
-     *  soft keyboards.
-     *
-     *  Supported values are defined in flash.text.ReturnKeyLabel:
-     *      "default" - default icon or label text
-     *      "done" - icon or label text indicating completed text entry
-     *      "go" - icon or label text indicating that an action should start
-     *      "next" - icon or label text indicating a move to the next field
-     *      "search" - icon or label text indicating that the entered text
-     *          should be searched for
+     *  @copy flash.text.StageText#returnKeyLabel
      *
      *  @langversion 3.0
      *  @playerversion AIR 3.0
@@ -1114,20 +1070,7 @@
     private var _softKeyboardType:String = SoftKeyboardType.DEFAULT;

     /**
-     *  @private
-     *  Hint indicating what kind of soft keyboard should be displayed for this
-     *  component.
-     *
-     *  Supported values are defined in flash.text.SoftKeyboardType:
-     *      "default" - the default keyboard
-     *      "punctuation" - puts the keyboard into punctuation/symbol entry mode
-     *      "url" - present soft keys appropriate for URL entry, such as a
-     *          specialized key that inserts '.com'
-     *      "number" - puts the keyboard into numeric keypad mode
-     *      "contact" - puts the keyboard into a mode appropriate for entering
-     *          contact information
-     *      "email" - puts the keyboard into e-mail addres entry mode, which may
-     *          make it easier to enter the at sign or '.com'
+     *  @copy flash.text.StageText#softKeyboardType
      *
      *  @langversion 3.0
      *  @playerversion AIR 3.0
@@ -1156,11 +1099,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  @copy mx.core.UIComponent#move()
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override public function move(x:Number, y:Number):void
     {
@@ -1177,11 +1116,7 @@
     }

     /**
-     *  Set focus to this text field.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override public function setFocus():void
     {
@@ -1199,13 +1134,7 @@
     }

     /**
-     *  @copy mx.core.UIComponent#styleChanged()
-     *
-     *  @param styleProp The style property that changed.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override public function styleChanged(styleProp:String):void
     {
@@ -1219,11 +1148,7 @@
     }

     /**
-     *  @copy mx.core.UIComponent#setActualSize()
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override public function setActualSize(w:Number, h:Number):void
     {
@@ -1232,19 +1157,15 @@
         if (!localViewPort)
             localViewPort = new Rectangle();

-        localViewPort.width = w;
-        localViewPort.height = h;
+        localViewPort.width = Math.max(0, w);
+        localViewPort.height = Math.max(0, h);

         invalidateViewPortFlag = true;
         invalidateProperties();
     }

     /**
-     *  @copy mx.core.UIComponent#measure()
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3.0
-     *  @productversion Flex 4.5.2
+     *  @private
      */
     override protected function measure():void
     {
@@ -1269,6 +1190,9 @@
         }
     }

+    /**
+     *  @private
+     */
     override protected function commitProperties():void
     {
         super.commitProperties();
@@ -1393,6 +1317,12 @@
     /**
      *  Selects all of the text.
      *
+     *
On iOS, for non multiline StyleableStageText objects, this function
+     *  is not supported and does nothing.

+     *
+     *
For some devices or operating systems, the selection may only be
+     *  visible when the StageText object has focus.

+     *
      *  @langversion 3.0
      *  @playerversion AIR 3.0
      *  @productversion Flex 4.5.2
@@ -1404,15 +1334,7 @@
     }

     /**
-     *  Selects a specified range of characters.
-     *
-     *
If either position is negative, it will deselect the text range.

-     *
-     *  @param anchorIndex The character position specifying the end of the
-     *  selection that stays fixed when the selection is extended.
-     *
-     *  @param activeIndex The character position specifying the end of the
-     *  selection that moves when the selection is extended.
+     *  @copy flash.text.StageText#selectRange()
      *
      *  @langversion 3.0
      *  @playerversion AIR 3.0
@@ -1789,11 +1711,11 @@

     /**
      *  @private
-     *  Forward the focus event to the StageText. The focusedStageText flag is
-     *  modified by the StageText's focus event handlers, not this one.
      */
     override protected function focusInHandler(event:FocusEvent):void
     {
+        //  Forward the focus event to the StageText. The focusedStageText flag
+        //  is modified by the StageText's focus event handlers, not this one.
         super.focusInHandler(event);

         if (stageText != null && focusedStageText != stageText && effectiveEnabled)


Transferred from the Adobe Open Source Subversion Repository

Revision: 21228
Author:   eday@adobe.com
Date:     2011-05-09T19:09:38.517827Z

Log Message:
-----------
Avoid fractional gutter width in StyleableTextField

The fractional gutter width (TEXT_WIDTH_PADDING/2) was exposing a bug in the QNX runtime wherein the text would shift one pixel right when drawn into a bitmap.

QE notes: none
Doc notes: none
Bugs: SDK-30292, SDK-30283
Reviewer: Glenn
Tests run: Cyclone, checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -1394,7 +1394,7 @@
         var topLevelApp:Application = FlexGlobals.topLevelApplication as Application;

         if (!(topLevelApp && topLevelApp.isSoftKeyboardActive))
-            event.preventDefault();
+        event.preventDefault();
     }

     //--------------------------------------------------------------------------
@@ -1461,7 +1461,7 @@
         {
             // return the x position of the text within the text field.  we calculate this value
             // using text field's x, offset by the left gutter
-            return x + StyleableTextField.TEXT_WIDTH_PADDING/2;
+            return x + StyleableTextField.TEXT_LEFT_GUTTER;
         }
         else
         {
@@ -1585,7 +1585,7 @@
         if (useTightTextBounds)
         {
             // offset the positions by the left gutters and the top offset
-            this.x = x - StyleableTextField.TEXT_WIDTH_PADDING/2;
+            this.x = x - StyleableTextField.TEXT_LEFT_GUTTER;
             this.y = y - tightTextTopOffset;
         }
         else
@@ -2174,6 +2174,13 @@

     /**
      *  @private
+     *  The width of the left gutter between the edge of the text field
+     *  and the text.
+     */
+    mx_internal static const TEXT_LEFT_GUTTER:int = 2;
+
+    /**
+     *  @private
      *  The padding to be added to textHeight to get the height
      *  of a TextField that can display the text without clipping.
      */


Transferred from the Adobe Open Source Subversion Repository

Revision: 18118
Author:   chiedozi@adobe.com
Date:     2010-10-11T06:05:33.778705Z

Log Message:
-----------
ViewNavigator now dispatches a private "viewChangeComplete" event when the active view is changed.  TabbedViewNavigator will forwards these events.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -1713,8 +1713,8 @@
             viewChanging = false;

             // Notify listeners that the view change is complete
-            if (hasEventListener(Event.COMPLETE))
-                dispatchEvent(new Event(Event.COMPLETE));
+            if (hasEventListener("viewChangeComplete"))
+                dispatchEvent(new Event("viewChangeComplete"));
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20182
Author:   chiedozi@adobe.com
Date:     2011-02-07T23:51:31.661530Z

Log Message:
-----------
Fixed an issue where TabbedViewNavigator didn't properly update its navigators when the active view's overlayControls property was true.
Removed the overlayControls property from ViewNavigatorBase.

QE notes:
Doc notes:
Bugs:SDK-29425
Reviewer: Evtim
Tests run:
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -250,7 +250,8 @@
                 navigationLayoutInvalidated ||
                 titleInvalidated ||
                 titleContentInvalidated ||
-                titleLayoutInvalidated;
+                titleLayoutInvalidated ||
+                overlayControlsInvalidated;
     }

     /**
@@ -316,6 +317,11 @@
      *  restored after a view transition.
      */
     private var explicitMouseChildren:Boolean;
+
+    /**
+     *  @private
+     */
+    private var overlayControlsInvalidated:Boolean = false;

     /**
      *  @private
@@ -1173,6 +1179,7 @@
         titleInvalidated = false;
         titleContentInvalidated = false;
         titleLayoutInvalidated = false;
+        overlayControlsInvalidated = false;
     }

     /**
@@ -1184,8 +1191,6 @@
      */
     override protected function commitProperties():void
     {
-        super.commitProperties();
-
         if (!isActive)
             return;

@@ -1221,6 +1226,11 @@
         // so that animations run again.
         if (disableNextControlAnimation)
             disableNextControlAnimation = false;
+
+        // Call base class' commitProperties after the above so that state changes
+        // as a result of overlayControls are caught.  This is okay because
+        // this method doesn't rely on any properties from the base class.
+        super.commitProperties();
     }

     /**
@@ -1412,12 +1422,13 @@
      */
     private function invalidateActionBarProperties():void
     {
-        actionContentInvalidated =
-        actionLayoutInvalidated =
-        navigationContentInvalidated =
-        navigationLayoutInvalidated =
-        titleInvalidated =
-        titleContentInvalidated =
+        actionContentInvalidated = true;
+        actionLayoutInvalidated = true;
+        navigationContentInvalidated = true;
+        navigationLayoutInvalidated = true;
+        titleInvalidated = true;
+        titleContentInvalidated = true;
+        overlayControlsInvalidated = true;
         titleLayoutInvalidated = true;

         invalidateProperties();
@@ -2059,19 +2070,6 @@
             updateControlsForView(pendingView);
         }

-        if (parentNavigator)
-            parentNavigator.updateControlsForView(pendingView);
-
-        // Need to force state change by calling validate properties again
-        if (overlayControls != pendingView.overlayControls)
-        {
-            overlayControls = pendingView.overlayControls;
-
-            // We need to force a commitProperties on the SkinnableComponent so that
-            // state changes are validated this frame.
-            super.commitProperties();
-        }
-
         // Only force validation for the navigator if initialized to avoid
         // validation from occurring with wrong measured dimensions
         if (initialized)
@@ -2171,6 +2169,7 @@
             actionBar.title = title;
             actionBar.titleContent = titleContent;
             actionBar.titleLayout = titleLayout;
+            overlayControls = false;
         }
         else
         {
@@ -2222,6 +2221,10 @@
                 titleLayoutInvalidated = false;
             }

+            // Need to force state change by calling validate properties again
+            if (overlayControlsInvalidated)
+                overlayControls = view.overlayControls;
+
             actionBar.visible = actionBar.includeInLayout = view && view.actionBarVisible;
             actionBarVisibilityInvalidated = false;
         }
@@ -2241,6 +2244,8 @@
         // Check for actionBar related property changes
         if (actionBar)
         {
+            var propertyInvalidated:Boolean = true;
+
             if (property == "title")
                 titleInvalidated = true;
             else if (property == "titleContent")
@@ -2255,11 +2260,16 @@
                 navigationContentInvalidated = true;
             else if (property == "navigationLayout")
                 navigationLayoutInvalidated  = true;
-            else if (property == "overlayControls")
-            {
-                overlayControls = event.newValue;
-            }
-
+            else
+                propertyInvalidated = false;
+
+            if (propertyInvalidated)
+                invalidateProperties();
+        }
+
+        if (property == "overlayControls")
+        {
+            overlayControlsInvalidated = true;
             invalidateProperties();
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5257
Author:   jszeto@adobe.com
Date:     2009-03-11T22:12:50.289894Z

Log Message:
-----------
Flex SDK Bug Fixes

SDK-19314 Arrow keys which move a slider's thumb also scroll the player window.

If we handle an arrow key or HOME/END, then we stop it from propagating.

SDK-19443 FxHSlider doesnt position tooltip/datatip correctly when on the right edge of the flex app

Added logic to ensure that the dataTip stays in the bounds of the screen

SDK-19384 @review tags are appearing before asdoc descriptions, causing empty ASDoc tooltips in Flex Builder

Removed all occurrences of @review since it is no longer used.

QE Notes: n/a
Doc Notes: n/a
Bugs: SDK-19314, SDK-19443, SDK-19384
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.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/framework/src/mx/styles/StyleManagerImpl.as</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/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ColorMatrixFilter.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/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/DropDownBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -43,14 +43,12 @@
 include "../../styles/metadata/SelectionFormatTextStyles.as"

 /**
- *  @review
- *
  *  The colors to use for the backgrounds of the items in the list.
  *  The value is an array of two or more colors.
  *  The backgrounds of the list items alternate among the colors in the array.
  *
  *  @default undefined
- *
+ *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.5
@@ -59,8 +57,6 @@
 [Style(name="alternatingItemColors", type="Array", arrayType="uint", format="Color", inherit="yes")]

 /**
- *  @review
- *
  *  The main color for a component.
  *
  *  @default 0xCCCCCC
@@ -73,8 +69,6 @@
 [Style(name="baseColor", type="uint", format="Color", inherit="yes")]

 /**
- *  @review
- *
  *  Color of the fill of an itemRenderer
  *
  *  @default 0xFFFFFF
@@ -87,8 +81,6 @@
 [Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes")]

 /**
- *  @review
- *
  *  Color of focus ring when the component is in focus
  *
  *  @default 0x70B2EE
@@ -101,8 +93,6 @@
 [Style(name="focusColor", type="uint", format="Color", inherit="yes")]

 /**
- *  @review
- *
  *  Color of the highlights when the mouse is over the component
  *
  *  @default 0xCEDBEF
@@ -115,13 +105,11 @@
 [Style(name="rollOverColor", type="uint", format="Color", inherit="yes")]

 /**
- *  @review
- *
  *  Color of any symbol of a component. Examples include the check mark of a FxCheckBox or
  *  the arrow of a FxScrollButton
  *
  *  @default 0x000000
- *
+ *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.5


Transferred from the Adobe Open Source Subversion Repository

Revision: 5757
Author:   jimurphy@adobe.com
Date:     2009-03-30T17:38:57.248111Z

Log Message:
-----------
Merged i11 revisions 5489,5524,5537 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/managed/ManagedExtension.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/swc/SwcScript.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilationUnit.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ASDocExtension.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/SyntaxTreeEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/linker/CULinkable.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Animate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/EmbedEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/swc/Swc.java</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerSwcContext.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableExtension.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/internal/OEMReport.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/Source.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/EmbedSkinClassEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/linker/ConsoleApplication.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/PersistenceStore.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerAPI.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/abc/AbcCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/swc/SwcGroup.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/As3Compiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/StyleEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/HostComponentEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -699,6 +699,19 @@
     }

     /**
+     *  Called when the child transform changes (currently x and y on UIComponent),
+     *  so that the Group has a chance to invalidate the layout.
+     */
+    public function childTransformChanged():void
+    {
+    	if (autoLayout)
+    	{
+	    	invalidateSize();
+	    	invalidateDisplayList();
+    	}
+    }
+
+    /**
      *  @private
      *  Invalidates the size, but doesn't run layout measure pass. This is useful
      *  for subclasses like Group that perform additional work there - like running


Transferred from the Adobe Open Source Subversion Repository

Revision: 12469
Author:   jimurphy@adobe.com
Date:     2009-12-03T22:04:16.560316Z

Log Message:
-----------
fix offsets for FB.  Convert line ending from lf to crlf in svn for the proects directory only.  When checking project files in, be sure to save you files this way.  Another update to make sure happens is set the svn properties svn:eol-style = native and svn:mime-type = text/plain (these have been updated on theses files as well)

QE notes: make sure the proper class is selected
Doc notes: no
Bugs: http://bugs.adobe.com/jira/browse/SDK-24498
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
133 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/interpolation/IInterpolator.as
+++ frameworks/projects/spark/src/spark/effects/interpolation/IInterpolator.as
@@ -94,4 +94,4 @@
      */
     function decrement(baseValue:Object, decrementValue:Object):Object;
 }
-}+}


now the button has a value

now the button has a value

git-svn-id: f772d44cbf86d9968f12179c1556189f5afcea6e@680 e0ac87d7-b42b-0410-9034-8248a05cb448

--- braineditor/ScrollControl.as
+++ braineditor/ScrollControl.as
@@ -4,6 +4,12 @@
 import Point;

 class ScrollControl extends AbstractButton {
+	var mPressed:Boolean;
+    var mValue:Number = 1;
+    var myMax:Number;
+    var myMin:Number;
+    var mText:TextField;
+
     function ScrollControl(parent:MovieClip, lowerLeft:Point, upperRight:Point) {
         super(parent,lowerLeft,upperRight,2,0x7f7f7f,0x3f3f3f,"");
         var localLowerLeft=lowerLeft.clone();
@@ -14,6 +20,10 @@
         translateTo(localLowerLeft);
         drawBoxOutline(new Point(0,0),dimensions, 2, 0x7f0000, 100, 0x3f0000, 50);
         resize(dimensions);
+
+     mSurface.createTextField("mText",mSurface.getNextHighestDepth(),3,3,dimensions.x-6,dimensions.y-6);
+     mText=mSurface.mText;
+     mText.text=mValue.toString();
         //Generate 3 boxes
             //top box
             //scroll grab box
@@ -21,6 +31,8 @@
     }
     function onPress(){
     	select(true);
+    	mValue++;
+    	mText.text=mValue.toString();
     }
     function onRelease(){
     	select(false);
@@ -29,10 +41,9 @@
     	select(false);
     }

-	var mPressed:Boolean;
-    var mValue:Number;
-    var myMax:Number;
-    var myMin:Number;
+
+
+
     //top box actions
     //middle box actions
     //bottom box actions


prettier output for the DebugLevel.SHADER_AGAL flag

--- src/aerys/minko/render/shader/compiler/graph/ShaderGraph.as
+++ src/aerys/minko/render/shader/compiler/graph/ShaderGraph.as
@@ -129,17 +129,16 @@
 		public function generateAGAL(name : String) : String
 		{
 			var instruction	: AgalInstruction;
-			var shader		: String = name + "\n\n";
+			var shader		: String = name + "\n";

 			if (!_isCompiled)
 				compile();

-			shader += "---------------- vertex shader ----------------\n";
+			shader += "- vertex shader\n";
 			for each (instruction in _vertexSequence)
 				shader += instruction.getAgal(true);

-			shader += "\n";
-			shader += "--------------- fragment shader ---------------\n";
+			shader += "- fragment shader\n";
 			for each (instruction in _fragmentSequence)
 				shader += instruction.getAgal(false);


commit flash

commit flash

--- media/flash/src/Grid.as
+++ media/flash/src/Grid.as
@@ -1,13 +0,0 @@
-package src
-{
-	import flash.display.MovieClip;
-
-	public class Grid extends MovieClip
-	{
-		public function Grid()
-		{
-
-		}
-	}
-
-}