Transferred from the Adobe Open Source Subversion Repository

Revision: 10588
Author:   smgilson@adobe.com
Date:     2009-09-25T16:55:23.560486Z

Log Message:
-----------
update ASDoc on the Border.as container

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

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

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

--- frameworks/projects/spark/src/spark/components/BorderContainer.as
+++ frameworks/projects/spark/src/spark/components/BorderContainer.as
@@ -17,10 +17,11 @@
 import spark.components.SkinnableContainer;

 /**
- *  Background image of a container.  This can be an absolute or relative
- *  URL or class.  You can either have both a backgroundColor and a
- *  backgroundImage set at the same time. The background image is displayed
- *  on top of the background color.
+ *  Background image of a container.
+ *  This can be an absolute or relative URL or class.
+ *  You can have both a backgroundColor and a
+ *  backgroundImage set at the same time.
+ *  The background image is displayed on top of the background color.
  *  The default value is undefined, meaning "not set".
  *  If this style and the backgroundColor style are undefined,
  *  the component has a transparent background.
@@ -33,18 +34,19 @@
 [Style(name="backgroundImage", type="Object", format="File", inherit="no")]

 /**
- *  The fillMode determines how the background image fills in the dimensions. If you set the value
- *  of this property in a tag, use the string (such as "repeat"). If you set the value of
- *  this property in ActionScript, use the constant (such as BitmapFillMode.CLIP).
- *
- *  When set to BitmapFillMode.CLIP ("clip"), the image
- *  ends at the edge of the region.
- *
- *  When set to BitmapFillMode.REPEAT ("repeat"), the image
- *  repeats to fill the region.
- *
- *  When set to BitmapFillMode.SCALE ("scale"), the image
- *  stretches to fill the region.
+ *  Determines how the background image fills in the dimensions.
+ *  If you set the value of this property in MXML, use the string (such as "repeat").
+ *  If you set the value of this property in ActionScript,
+ *  use the constant (such as BitmapFillMode.CLIP).
+ *
+ *
When set to BitmapFillMode.CLIP ("clip"), the image
+ *  ends at the edge of the region.

+ *
+ *
When set to BitmapFillMode.REPEAT ("repeat"), the image
+ *  repeats to fill the region.

+ *
+ *
When set to BitmapFillMode.SCALE ("scale"), the image
+ *  stretches to fill the region.

  *
  *  @default BitmapFillMode.SCALE
  *
@@ -71,8 +73,8 @@

 /**
  *  Color of the border.
- *  The default value depends on the component class;
- *  if not overridden for the class, the default value is 0xB7BABC.
+ *
+ *  @default 0xB7BABC
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -95,8 +97,9 @@
 [Style(name="borderStyle", type="String", enumeration="inset,solid", inherit="no")]

 /**
- *  Determines if the border is visible or not. If true, then no border will be visible,
- *  except a border set via the borderStroke property.
+ *  Determines if the border is visible or not.
+ *  If false, then no border is visible
+ *  except a border set by using the borderStroke property.
  *
  *  @default true
  *
@@ -120,8 +123,9 @@
 [Style(name="borderWeight", type="Number", format="Length", inherit="no")]

 /**
- *  Radius of the curved corners of the border
- *  if not overriden for the class, the default value is 0.
+ *  Radius of the curved corners of the border.
+ *
+ *  @default 0
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -131,7 +135,7 @@
 [Style(name="cornerRadius", type="Number", format="Length", inherit="no")]

 /**
- *  Boolean property that specifies whether the container has a visible
+ *  If true, the container has a visible
  *  drop shadow.
  *
  *  @default false
@@ -144,8 +148,45 @@
 [Style(name="dropShadowVisible", type="Boolean", inherit="no")]

 /**
- *  The Border class is a convenience class that provides a set of common styles that control
- *  the appearance of the border and background of a container.
+ *  The Border class defines a set of CSS styles that control
+ *  the appearance of the border and background fill of the container.
+ *
+ *
Note: Becasue you use CSS styles and class properties to control
+ *  the appearance of the Border container, you cannot create a custom skin for it.

+ *
+ *
The Border control has the following default characteristics:

+ *

+ *
Characteristic	Description

+ *
Default size	112 pixels by 112 pixels

+ *
Minimum size	0 pixels

+ *
Maximum size	No limit

+ *

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

+ *
+ *

+ *  <mx:Border
+ *    Properties
+ *    backgroundFill="null"
+ *    borderStroke="null"
+ *
+ *    Styles
+ *    backgroundImage="undefined"
+ *    backgroundImageFillMode="scale"
+ *    borderAlpha="1.0"
+ *    borderColor="0xB7BABC"
+ *    borderStyle="solid"
+ *    borderVisible="true"
+ *    borderWeight="1"
+ *    cornerRadius="0"
+ *    dropShadowVisible="false"
+ *  />
+ *

+ *
+ *  @see spark.skins.spark.BorderSkin
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -155,25 +196,38 @@
 public class Border extends SkinnableContainer
 {
     /**
-     *  Constructor
+     *  Constructor.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-	public function Border()
-	{
-	    super();
-	}
+    public function Border()
+    {
+        super();
+    }

     private var _backgroundFill:IFill;

     /**
-     *  The backgroundFill is used to draw the background of the Border.
-     *  Setting this property will override the backgroundAlpha,
-     *  backgroundColor, backgroundImage and backgroundImageFillMode styles.
-     *
+     *  Defines the background of the Border.
+     *  Setting this property override the backgroundAlpha,
+     *  backgroundColor, backgroundImage,
+     *  and backgroundImageFillMode styles.
+     *
+     *
The following example uses the backgroundFill property
+     *  to set the background color to red:

+     *
+     *

+     *  <s:Border cornerRadius="10">
+     *     <s:backgroundFill>
+     *         <s:SolidColor
+     *             color="red"
+     *             alpha="100"/>
+     *     </s:backgroundFill>
+     *  </s:Border>

+     *
      *  @default null
      *
      *  @langversion 3.0
@@ -186,6 +240,9 @@
         return _backgroundFill;
     }

+    /**
+     *  @private
+     */
     public function set backgroundFill(value:IFill):void
     {
         if (value == _backgroundFill)
@@ -200,9 +257,22 @@
     private var _borderStroke:IStroke;

     /**
-     *  The borderStroke draws the border of the Border. Setting this property will override
-     *  the borderAlpha, borderColor, borderStyle, borderVisible and borderWeight styles.
-     *
+     *  Defines the border of the Border container.
+     *  Setting this property override the borderAlpha,
+     *  borderColor, borderStyle, borderVisible,
+     *  and borderWeight styles.
+     *
+     *
The following example sets the borderStroke property:

+     *
+     *

+     *  <s:Border cornerRadius="10">
+     *     <s:borderStroke>
+     *         <mx:SolidColorStroke
+     *             color="black"
+     *             weight="3"/>
+     *     </s:borderStroke>
+     *  </s:Border>

+     *
      *  @default null
      *
      *  @langversion 3.0
@@ -215,6 +285,9 @@
         return _borderStroke;
     }

+    /**
+     *  @private
+     */
     public function set borderStroke(value:IStroke):void
     {
         if (value == _borderStroke)


Transferred from the Adobe Open Source Subversion Repository

Revision: 12436
Author:   smgilson@adobe.com
Date:     2009-12-03T16:08:12.117370Z

Log Message:
-----------
ASDoc localization prep

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/automation/IAutomationObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/BorderContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>

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

--- frameworks/projects/spark/src/spark/components/BorderContainer.as
+++ frameworks/projects/spark/src/spark/components/BorderContainer.as
@@ -156,7 +156,7 @@
  *  The BorderContainer class defines a set of CSS styles that control
  *  the appearance of the border and background fill of the container.
  *
- *
Note: Becasue you use CSS styles and class properties to control
+ *
Note: Because you use CSS styles and class properties to control
  *  the appearance of the BorderContainer, you typically do not create a custom skin for it.
  *  If you do create a custom skin, your skin class should apply any styles to control the
  *  appearance of the container.


XIFF-83 Currently 195 tests, 0 failures and 0 errors. First time everything is passing.

--- src/org/igniterealtime/xiff/data/xhtml/XHTMLExtension.as
+++ src/org/igniterealtime/xiff/data/xhtml/XHTMLExtension.as
@@ -92,25 +92,11 @@
 		 */
 		public function get body():String
 		{
-			var list:XMLList = xml.children().(localName() == "body");
-			if (list.length() > 0)
-			{
-				XML.prettyPrinting = false;
-				return list[0].toXMLString();
-			}
-			return null;
+			return getField("body");
 		}
 		public function set body(value:String):void
 		{
-			if (value == null)
-			{
-				delete xml.body;
-			}
-			else
-			{
-				var node:XML = new XML(value);
-				xml.body = node;
-			}
+			setField("body", value);
 		}
 	}
 }


Рефакторинг прогрессов

Рефакторинг прогрессов

--- src/main/org/shypl/common/util/progress/TemporaryProgress.as
+++ src/main/org/shypl/common/util/progress/TemporaryProgress.as
@@ -1,42 +1,68 @@
 package org.shypl.common.util.progress {
 	import flash.utils.getTimer;
-
+
 	import org.shypl.common.timeline.GlobalTimeline;
 	import org.shypl.common.util.Cancelable;
-
+
 	public class TemporaryProgress extends AbstractProgress {
-		private var _time:int;
+		private var _totalTime:int;
 		private var _autoComplete:Boolean;
 		private var _autoCompleteTask:Cancelable;
-		private var _startTime:int;
-
-		public function TemporaryProgress(seconds:int, autoComplete:Boolean) {
-			_time = seconds * 1000;
+		private var _lostTime:int;
+		private var _startTime:int = -1;
+
+		public function TemporaryProgress(seconds:int, autoComplete:Boolean, autoStartPlay:Boolean = true) {
+			_totalTime = seconds * 1000;
+			_lostTime = _totalTime;
 			_autoComplete = autoComplete;
-			_startTime = getTimer();
-
-			if (_autoComplete) {
-				_autoCompleteTask = GlobalTimeline.schedule(_time, complete);
+
+			if (autoStartPlay) {
+				startPlay();
 			}
 		}
-
+
+		private function get played():Boolean {
+			return _startTime !== -1;
+		}
+
 		public final function makeComplete():void {
 			complete();
 		}
-
-		override protected function calculatePercent():Number {
-			var passedTime:int = getTimer() - _startTime;
-			if (passedTime >= _time) {
-				return _autoComplete ? 1 : 0.99;
+
+		public final function startPlay():void {
+			if (!played) {
+				_startTime = getTimer();
+				if (_autoComplete) {
+					_autoCompleteTask = GlobalTimeline.schedule(_lostTime, complete);
+				}
 			}
-			return passedTime / _time * (_autoComplete ? 1 : 0.99);
 		}
-
-		override protected function complete():void {
+
+		public final function stopPlay():void {
+			if (played) {
+				cancelAutoCompleteTask();
+				_lostTime = _totalTime - (getTimer() - _startTime);
+				_startTime = -1;
+			}
+		}
+
+		public function cancelAutoCompleteTask():void {
 			if (_autoComplete) {
 				_autoCompleteTask.cancel();
 				_autoCompleteTask = null;
 			}
+		}
+
+		override protected function calculatePercent():Number {
+			var passedTime:int = played ? (getTimer() - _startTime) : _totalTime - _lostTime;
+			if (passedTime >= _totalTime) {
+				return _autoComplete ? 1 : 0.99;
+			}
+			return passedTime / _totalTime * (_autoComplete ? 1 : 0.99);
+		}
+
+		override protected function complete():void {
+			cancelAutoCompleteTask();
 			super.complete();
 		}
 	}


updated comments

updated comments

Change-Id: I14ccdc2ab41727fe43c0f972e196ac5678b9d1d7

--- WeaveAPI/src/weave/api/core/IExternalSessionStateInterface.as
+++ WeaveAPI/src/weave/api/core/IExternalSessionStateInterface.as
@@ -138,14 +138,15 @@
 		 *  document.getElementById('weave').evaluateExpression(null, 'openDefaultEditor()', null, ['weave.ui::SessionStateEditor'])
 		 *

 		 *
-		 * Note that any code written for this function depends on the implementation of the Actionscript
-		 * code inside Weave. This code is subject to change.
+		 * Note that any code written for this function depends on the implementation of the ActionScript
+		 * code inside Weave, which is subject to change.
 		 *
-		 * @param scopeObjectPath A sequence of child names used to refer to an object appearing in the session state.
+		 * @param scopeObjectPath A sequence of child names used to refer to an object appearing in the session state which will be used as the this pointer when evaluating the expression.
 		 * @param expression The expression to evaluate.
 		 * @param variables A hash map of variable names to values.
 		 * @param staticLibraries An array of fully qualified class names which contain static methods to include the expression.
 		 * @return The value of the evaluated expression.
+		 * @see weave.compiler.Compiler
 		 */
 		function evaluateExpression(objectPath:Array, methodName:String, variables:Object = null, libraries:Array = null):*;

@@ -158,6 +159,7 @@
 		 * @param callback The callback function that will only be allowed to run during a scheduled time each frame.  It must be specified as a String and must not require any parameters.
 		 * @param triggerCallbackNow If this is set to true, the callback will be triggered to run during the scheduled time after it is added.
 		 * @return true if objectPath refers to an existing object in the session state.
+		 * @see weave.api.core.ICallbackInterface#addGroupedCallback
 		 */
 		function addCallback(objectPath:Array, callback:String, triggerCallbackNow:Boolean = false):Boolean;


added error reporting

added error reporting

--- WeaveCore/src/weave/core/ExternalSessionStateInterface.as
+++ WeaveCore/src/weave/core/ExternalSessionStateInterface.as
@@ -27,9 +27,9 @@
 	import weave.api.core.ILinkableHashMap;
 	import weave.api.core.ILinkableObject;
 	import weave.api.getCallbackCollection;
-	import weave.api.reportError;
 	import weave.compiler.Compiler;
 	import weave.compiler.ICompiledObject;
+	import weave.compiler.StandardLib;
 	import weave.utils.Dictionary2D;

 	/**
@@ -51,12 +51,16 @@
 		 */
 		public function getSessionState(objectPath:Array):Object
 		{
-			var object:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, objectPath);
-			if (object == null)
-				return null;
-			var state:Object = WeaveAPI.SessionManager.getSessionState(object);
-			convertSessionStateToPrimitives(state); // do not allow XML objects to be returned
-			return state;
+			var object:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, objectPath);
+			if (object)
+			{
+				var state:Object = WeaveAPI.SessionManager.getSessionState(object);
+				convertSessionStateToPrimitives(state); // do not allow XML objects to be returned
+				return state;
+			}
+
+			externalWarning("No ILinkableObject from which to get session state at path " + Compiler.stringify(objectPath));
+			return null;
 		}

 		/**
@@ -80,11 +84,15 @@
 		 */
 		public function setSessionState(objectPath:Array, newState:Object, removeMissingObjects:Boolean = true):Boolean
 		{
-			var object:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, objectPath);
-			if (object == null)
-				return false;
-			WeaveAPI.SessionManager.setSessionState(object, newState, removeMissingObjects);
-			return true;
+			var object:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, objectPath);
+			if (object)
+			{
+				WeaveAPI.SessionManager.setSessionState(object, newState, removeMissingObjects);
+				return true;
+			}
+
+			externalError("No ILinkableObject for which to set session state at path " + Compiler.stringify(objectPath));
+			return false;
 		}

 		/**
@@ -93,9 +101,11 @@
 		public function getObjectType(objectPath:Array):String
 		{
 			var object:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, objectPath);
-			if (object == null)
-				return null;
-			return getQualifiedClassName(object);
+			if (object)
+				return getQualifiedClassName(object);
+
+			// no warning since getObjectType() may be used to check whether or not an object exists.
+			return null;
 		}

 		/**
@@ -104,25 +114,35 @@
 		public function getChildNames(objectPath:Array):Array
 		{
 			var object:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, objectPath);
-			if (object == null)
-				return null;
-			if (object is ILinkableHashMap)
-				return (object as ILinkableHashMap).getNames();
-			if (object is ILinkableDynamicObject)
-				return [(object as ILinkableDynamicObject).globalName];
-			return (WeaveAPI.SessionManager as SessionManager).getLinkablePropertyNames(object);
+			if (object)
+			{
+				if (object is ILinkableHashMap)
+					return (object as ILinkableHashMap).getNames();
+				if (object is ILinkableDynamicObject)
+					return [(object as ILinkableDynamicObject).globalName];
+				return (WeaveAPI.SessionManager as SessionManager).getLinkablePropertyNames(object);
+			}
+
+			externalWarning("No ILinkableObject for which to get child names at path " + Compiler.stringify(objectPath));
+			return null;
 		}

 		/**
 		 * @inheritDoc
 		 */
 		public function setChildNameOrder(hashMapPath:Array, orderedChildNames:Array):Boolean
-		{
+		{
 			var hashMap:ILinkableHashMap = WeaveAPI.SessionManager.getObject(_rootObject, hashMapPath) as ILinkableHashMap;
-			if (!hashMap || !orderedChildNames)
-				return false;
-			hashMap.setNameOrder(orderedChildNames);
-			return true;
+			if (hashMap)
+			{
+				// it's ok if there are no names specified, because that wouldn't accomplish anything anyway
+				if (orderedChildNames)
+					hashMap.setNameOrder(orderedChildNames);
+				return true;
+			}
+
+			externalError("No ILinkableHashMap for which to reorder children at path " + Compiler.stringify(hashMapPath));
+			return false;
 		}

 		/**
@@ -130,22 +150,32 @@
 		 */
 		public function requestObject(objectPath:Array, objectType:String):Boolean
 		{
-			if (!objectPath || !objectPath.length)
-				return false;
-
-			// Get parent object first in case there is some backwards compatibility code that gets
-			// executed when it is accessed (registering deprecated class definitions, for example).
-			var parentPath:Array = objectPath.concat();
-			var childName:Object = parentPath.pop();
-			var parent:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, parentPath);
-
 			// get class definition
 			var classQName:String = WeaveXMLDecoder.getClassName(objectType);
 			var classDef:Class = ClassUtils.getClassDefinition(classQName);
 			if (classDef == null)
+			{
+				externalError("No class definition for " + Compiler.stringify(classQName));
 				return false;
-			if (ClassUtils.isClassDeprecated(classQName))
-				WeaveAPI.externalTrace("Warning: " + objectType + " is deprecated.");
+			}
+			if (ClassUtils.isClassDeprecated(classQName))
+				externalWarning(objectType + " is deprecated.");
+
+			// stop if there is no path specified
+			if (!objectPath || !objectPath.length)
+			{
+				if (Object(_rootObject).constructor == classDef)
+					return true;
+
+				externalError("Cannot request an object at the root path");
+				return false;
+			}
+
+			// Get parent object first in case there is some backwards compatibility code that gets
+			// executed when it is accessed (registering deprecated class definitions, for example).
+			var parentPath:Array = objectPath.concat();
+			var childName:Object = parentPath.pop();
+			var parent:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, parentPath);

 			// request the child object
 			var hashMap:ILinkableHashMap = parent as ILinkableHashMap;
@@ -161,7 +191,12 @@
 				child = dynamicObject.requestGlobalObject(childName as String, classDef, false);
 			else
 				child = WeaveAPI.SessionManager.getObject(_rootObject, objectPath);
-			return child && child.constructor == classDef;
+
+			if (child && child.constructor == classDef)
+				return true;
+
+			externalError(StandardLib.substitute("Request for {0} failed at path {1}", objectType, Compiler.stringify(objectPath)));
+			return false;
 		}

 		/**
@@ -169,24 +204,29 @@
 		 */
 		public function removeObject(objectPath:Array):Boolean
 		{
-			if (!objectPath || !objectPath.length)
-				return false;
-			objectPath = objectPath.concat();
-			var childName:Object = objectPath.pop();
-			var object:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, objectPath);
-			var hashMap:ILinkableHashMap = object as ILinkableHashMap;
-			var dynamicObject:ILinkableDynamicObject = object as ILinkableDynamicObject;
-			if (hashMap)
-			{
-				if (childName is Number)
-					childName = hashMap.getNames()[childName];
-				hashMap.removeObject(childName as String);
-			}
-			else if (dynamicObject)
-				dynamicObject.removeObject();
-			else
-				return false;
-			return true;
+			if (objectPath && objectPath.length)
+			{
+				objectPath = objectPath.concat();
+				var childName:Object = objectPath.pop();
+				var parent:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, objectPath);
+				var hashMap:ILinkableHashMap = parent as ILinkableHashMap;
+				var dynamicObject:ILinkableDynamicObject = parent as ILinkableDynamicObject;
+				if (hashMap)
+				{
+					if (childName is Number)
+						childName = hashMap.getNames()[childName];
+					hashMap.removeObject(childName as String);
+					return true;
+				}
+				else if (dynamicObject)
+				{
+					dynamicObject.removeObject();
+					return true;
+				}
+			}
+
+			externalWarning("No suitable parent from which to remove a child at path " + Compiler.stringify(objectPath));
+			return false;
 		}

 		/**
@@ -214,22 +254,41 @@
 		 */
 		private const _variables:Object = {};

+		/**
+		 * Gets an object from a path or a variable name and sets getObjectFromPathOrVariableName_error.
+		 * If the path was invalid or the variable uninitialized, getObjectFromPathOrVariableName_error will be set with an appropriate error message.
+		 * @param objectPathOrVariableName Either an Array for a path or a String for a variable name.
+		 * @return The object at the specified path, the value of the specified variable, or null if the parameter was null.
+		 */
 		private function getObjectFromPathOrVariableName(objectPathOrVariableName:Object):*
 		{
+			getObjectFromPathOrVariableName_error = null;
+
+			if (objectPathOrVariableName == null)
+				return null;
+
 			if (objectPathOrVariableName is Array)
-				return WeaveAPI.SessionManager.getObject(_rootObject, objectPathOrVariableName as Array);
-
-			var variableName:String = objectPathOrVariableName as String;
+			{
+				var object:ILinkableObject = WeaveAPI.SessionManager.getObject(_rootObject, objectPathOrVariableName as Array);
+				if (object)
+					return object;
+
+				getObjectFromPathOrVariableName_error = "No ILinkableObject at path " + Compiler.stringify(objectPathOrVariableName);
+			}
+
+			var variableName:String = String(objectPathOrVariableName);
 			if (variableName)
 			{
 				if (_variables.hasOwnProperty(variableName))
 					return _variables[variableName];

-				reportError('Undefined variable "' + variableName + '"');
+				getObjectFromPathOrVariableName_error = "Undefined variable " + Compiler.stringify(variableName);
 			}

 			return null;
 		}
+
+		private var getObjectFromPathOrVariableName_error:String = null;

 		private const _compiler:Compiler = new Compiler();

@@ -248,10 +307,17 @@
 					throw new Error("Invalid variable name: " + Compiler.encodeString(assignVariableName));

 				var thisObject:Object = getObjectFromPathOrVariableName(scopeObjectPathOrVariableName);
+				if (getObjectFromPathOrVariableName_error)
+					throw new Error(getObjectFromPathOrVariableName_error);
 				var compiledObject:ICompiledObject = _compiler.compileToObject(expression);
 				var isFuncDef:Boolean = _compiler.compiledObjectIsFunctionDefinition(compiledObject);
 				// passed-in variables take precedence over stored ActionScript _variables
-				var compiledMethod:Function = _compiler.compileObjectToFunction(compiledObject, [variables, _variables], reportError, thisObject != null);
+				var compiledMethod:Function = _compiler.compileObjectToFunction(
+					compiledObject,
+					[variables, _variables],
+					WeaveAPI.ErrorManager.reportError,
+					thisObject != null
+				);
 				var result:*;
 				if (isAssignment && isFuncDef)
 				{
@@ -270,7 +336,7 @@
 			}
 			catch (e:*)
 			{
-				reportError(e);
+				externalError(e);
 			}
 			return undefined;
 		}
@@ -298,7 +364,7 @@
 					}
 					catch (e:*)
 					{
-						reportError(e);
+						externalError(e);
 					}
 					ExternalInterface.marshallExceptions = prev;
 				}
@@ -311,15 +377,39 @@
 		 */
 		public function addCallback(scopeObjectPathOrVariableName:Object, callback:String, triggerCallbackNow:Boolean = false, immediateMode:Boolean = false):Boolean
 		{
-			var object:ILinkableObject = getObjectFromPathOrVariableName(scopeObjectPathOrVariableName) as ILinkableObject;
-			if (object == null)
-				return false;
-			_d2d_callbackStr_target.set(callback, object, true);
-			if (immediateMode)
-				getCallbackCollection(object).addImmediateCallback(null, getCachedCallbackFunction(callback), triggerCallbackNow);
-			else
-				getCallbackCollection(object).addGroupedCallback(null, getCachedCallbackFunction(callback), triggerCallbackNow);
-			return true;
+			try
+			{
+				if (scopeObjectPathOrVariableName == null)
+				{
+					externalError("addCallback(): No path or variable name given");
+					return false;
+				}
+
+				var object:ILinkableObject = getObjectFromPathOrVariableName(scopeObjectPathOrVariableName) as ILinkableObject;
+				if (getObjectFromPathOrVariableName_error)
+				{
+					externalError(getObjectFromPathOrVariableName_error);
+					return false;
+				}
+				if (object == null)
+				{
+					externalError("No ILinkableObject to which to add a callback at path or variable " + Compiler.stringify(scopeObjectPathOrVariableName));
+					return false;
+				}
+
+				_d2d_callbackStr_target.set(callback, object, true);
+				if (immediateMode)
+					getCallbackCollection(object).addImmediateCallback(null, getCachedCallbackFunction(callback), triggerCallbackNow);
+				else
+					getCallbackCollection(object).addGroupedCallback(null, getCachedCallbackFunction(callback), triggerCallbackNow);
+				return true;
+			}
+			catch (e:Error)
+			{
+				// unexpected error reported in Weave interface
+				WeaveAPI.ErrorManager.reportError(e);
+			}
+			return false;
 		}

 		/**
@@ -336,12 +426,36 @@
 				return true;
 			}

-			var object:ILinkableObject = getObjectFromPathOrVariableName(objectPathOrVariableName) as ILinkableObject;
-			if (object == null)
-				return false;
-			_d2d_callbackStr_target.remove(callback, object);
-			getCallbackCollection(object).removeCallback(getCachedCallbackFunction(callback));
-			return true;
+			try
+			{
+				if (objectPathOrVariableName == null)
+				{
+					externalWarning("removeCallback(): No path or variable name given");
+					return false;
+				}
+
+				var object:ILinkableObject = getObjectFromPathOrVariableName(objectPathOrVariableName) as ILinkableObject;
+				if (getObjectFromPathOrVariableName_error)
+				{
+					externalError(getObjectFromPathOrVariableName_error);
+					return false;
+				}
+				if (object == null)
+				{
+					externalWarning("No ILinkableObject from which to remove a callback at path or variable " + Compiler.stringify(objectPathOrVariableName));
+					return false;
+				}
+
+				_d2d_callbackStr_target.remove(callback, object);
+				getCallbackCollection(object).removeCallback(getCachedCallbackFunction(callback));
+				return true;
+			}
+			catch (e:Error)
+			{
+				// unexpected error reported in Weave interface
+				WeaveAPI.ErrorManager.reportError(e);
+			}
+			return false;
 		}

 		/**
@@ -355,5 +469,15 @@
 			_callbackFunctionCache = {};
 			_d2d_callbackStr_target = new Dictionary2D(true, true);
 		}
+
+		private static function externalError(message:String):void
+		{
+			WeaveAPI.externalError("Error: " + message);
+		}
+
+		private static function externalWarning(message:String):void
+		{
+			WeaveAPI.externalError("Warning: " + message);
+		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/charts/src/mx/charts/chartClasses/IBar.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/IBar.as
@@ -0,0 +1,97 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.charts.chartClasses
+{
+
+/**
+ *  The IBar interface is implemented by any any series
+ *  that can be clustered vertically, such as a BarSeries.
+ *  The BarSet series type requires that any sub-series
+ *  assigned to it implement this interface.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public interface IBar
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+    //----------------------------------
+	//  barWidthRatio
+    //----------------------------------
+
+	/**
+	 *  Specifies how wide to render the items relative to the category.
+	 *  A value of 1 uses the entire space, while a value
+	 *  of 0.6 uses 60% of the category's available space.
+	 *  You typically do not set this property directly.
+	 *  A governing BarSet or BarChart would implicitly assign this value.
+	 *  The actual size used is the smaller of barWidthRatio
+	 *  and the maxbarWidth property
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	function set barWidthRatio(value:Number):void;
+
+    //----------------------------------
+	//  maxBarWidth
+    //----------------------------------
+
+	/**
+	 *  Specifies how wide to draw the items, in pixels.
+	 *  The actual item width used is the smaller of this style
+	 *  and the barWidthRatio property.
+	 *  You typically do not set this property directly.
+	 *  The BarSet or BarChart objects assign this value.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	function set maxBarWidth(value:Number):void;
+
+    //----------------------------------
+	//  offset
+    //----------------------------------
+
+	/**
+	 *  Specifies how far to offset the center of the items
+	 *  from the center of the available space, relative the category size.
+	 *  The range of values is a percentage in the range
+	 *  -100 to 100.
+	 *  Set to 0 to center the items in the space.
+	 *  Set to -50 to center the item
+	 *  at the beginning of the available space.
+	 *  You typically do not set this property directly.
+	 *  The BarSet or BarChart objects assign this value.
+	 *
+	 *  @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	function set offset(value:Number):void;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 20844
Author:   jimurphy@adobe.com
Date:     2011-03-14T15:10:07.899037Z

Log Message:
-----------
block hero_private revs 20698,20699,20702 from being merged into trunk
revert 20839,20841,20842,20843

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ISortField.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientBase.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodgeShader.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TabBar.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/StringUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>

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

--- frameworks/projects/framework/src/mx/collections/ArrayList.as
+++ frameworks/projects/framework/src/mx/collections/ArrayList.as
@@ -95,8 +95,6 @@
     /**
      *  Construct a new ArrayList using the specified array as its source.
      *  If no source is specified an empty array will be used.
-     *
-     *  @param source The Array to use as a source for the ArrayList.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


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


Transferred from the Adobe Open Source Subversion Repository

Revision: 5165
Author:   cframpto@adobe.com
Date:     2009-03-04T18:21:38.215558Z

Log Message:
-----------
RadioButton bug fixes.

QE Notes: tests: gumbo/RadioButton and checkintests passed
Doc Notes:
Bugs: SDK-19622, SDK-19527, SDK-19614, SDK-19473, SDK-18460
Reviewers: Corey

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/bundles/en_US/components.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxRadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxRadioButton.as</path>

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

--- frameworks/projects/spark/src/spark/components/RadioButton.as
+++ frameworks/projects/spark/src/spark/components/RadioButton.as
@@ -11,14 +11,16 @@

 package mx.components
 {
+import flash.display.DisplayObject;
 import flash.events.Event;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
 import flash.ui.Keyboard;
+
 import mx.core.IFlexDisplayObject;
+import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
-import mx.core.FlexVersion;
 import mx.events.ItemClickEvent;
 import mx.managers.IFocusManager;
 import mx.managers.IFocusManagerGroup;
@@ -177,15 +179,12 @@
      *  The FxRadioButtonGroup object to which this FxRadioButton belongs.
      *  When creating radio buttons to put in a FxRadioButtonGroup, it is
      *  advisable to use group for all of the buttons or groupName for all of
-     *  the buttons.  In addition, all radio buttons in the group must have the
-     *  same parent.
-     *
-     *  @default "undefined"
+     *  the buttons.  The groupName will be set to the generated name of the
+     *  FxRadioButtonGroup object.
+     *
+     *  @default the default FxRadioButtonGroup
      *  @see #groupName
      *
-     *  @throws ArgumentError If the radio button has a different parent than
-     *  the other radio buttons already in the group.
-     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
@@ -251,7 +250,12 @@
         // If the button was in another group, remove it.
         removeFromGroup();

-        _group = value;
+        _group = value;
+
+        // If the group is set then the groupName is the generated name of
+        // the rbg.  If it's set to null, then set the groupName back to the
+        // default group so this button will move back to that group.
+        _groupName = value ? group.mx_internal::name : "radioGroup";

         // Make sure this gets added to it's FxRadioButtonGroup
         groupChanged = true;
@@ -285,14 +289,11 @@
      *  even if they belong to different radio button groups.  When creating
      *  radio buttons to put in a FxRadioButtonGroup, it is advisable to
      *  use group for all of the buttons or groupName for all of the buttons.
-     *  In addition, all radio buttons in the group must have the same parent.
      *
-     *  @default "radioGroup"
+     *  @default "FxRadioButtonGroup_number" where number is an integer greater
+     *  than or equal to 0.
      *  @see #group
      *
-     *  @throws ArgumentError If the radio button has a different parent than
-     *  the other radio buttons already in the group.
-     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
@@ -379,6 +380,9 @@
      */
     public function set value(value:Object):void
     {
+        if (_value == value)
+            return;
+
         _value = value;

         if (selected && group)
@@ -449,25 +453,14 @@
     /**
      *  @private
      *  Create radio button group if it does not exist
-     *  and add the instance to the group.
-     *
-     *  @throws ArgumentError If the radio button has a different parent than
-     *  the other radio buttons already in the group.
+     *  and add the instance to the group.
      */
     private function addToGroup():FxRadioButtonGroup
     {
         var g:FxRadioButtonGroup = group; // Trigger getting the group
         if (g)
-        {
-            if (g.numRadioButtons && g.getRadioButtonAt(0).parent != parent)
-            {
-                throw ArgumentError(
-                    resourceManager.getString("components", "rbMustHaveSameParent"));
-            }
-
             g.mx_internal::addInstance(this);
-        }
-
+
         return g;
     }

@@ -512,7 +505,7 @@
         {
             var radioButton:FxRadioButton =
                     g.getRadioButtonAt(mx_internal::indexNumber - i);
-            if (radioButton && radioButton.enabled)
+            if (radioButton && isRadioButtonEnabled(radioButton))
             {
                 if (moveSelection)
                     g.mx_internal::setSelection(radioButton);
@@ -542,7 +535,7 @@
         for (var i:int = mx_internal::indexNumber + 1; i < g.numRadioButtons; i++)
         {
             var radioButton:FxRadioButton = g.getRadioButtonAt(i);
-            if (radioButton && radioButton.enabled)
+            if (radioButton && isRadioButtonEnabled(radioButton))
             {
                 if (moveSelection)
                     g.mx_internal::setSelection(radioButton);
@@ -558,6 +551,32 @@

     /**
      *  @private
+     *  When using keyboard navigation, need to make sure we don't move to
+     *  a radio button that's not enabled because it's in a different
+     *  container that isn't enabled.
+     */
+    private function isRadioButtonEnabled(rb:FxRadioButton):Boolean
+    {
+        if (!rb.enabled)
+            return false;
+
+        var sbRoot:DisplayObject = rb.systemManager.getSandboxRoot();
+
+        // If it's in another UIComponent like a container, is that enabled?
+        var p:DisplayObject = rb.parent;
+        while (p && p != sbRoot)
+        {
+            if (p is UIComponent && !UIComponent(p).enabled)
+                return false;
+
+            p = p.parent;
+        }
+
+        return true;
+    }
+
+    /**
+     *  @private
      */
     private function setThis():void
     {
@@ -577,9 +596,14 @@
      */
     override public function get enabled():Boolean
     {
-        return super.enabled &&
-                    (!mx_internal::radioButtonGroup ||
-                        mx_internal::radioButtonGroup.enabled);
+        // Is the radio button itself enabled?
+        if (!super.enabled)
+            return false;
+
+        // The button is enabled so it's enabled if it's not in a group
+        // or the group is enabled.
+        return !mx_internal::radioButtonGroup ||
+               mx_internal::radioButtonGroup.enabled;
     }

     //--------------------------------------------------------------------------
@@ -596,10 +620,16 @@
     {
         super.updateDisplayList(unscaledWidth, unscaledHeight);

-        // If this button is in a rb group and it's selected, but it's not the
-        // current selection, deselect the old rb and select this rb.
-        if (_group && selected && _group.selection != this)
-            _group.mx_internal::setSelection(this, false);
+        // If this rb is selected and in a group, make sure it is the group
+        // selection.  If it is not selected and it's in a group, make sure it
+        // is not the group selection.
+        if (group)
+        {
+            if (selected)
+                _group.selection = this;
+            else if (group.selection == this)
+                _group.selection = null;
+        }
     }

     //--------------------------------------------------------------------------
@@ -614,9 +644,9 @@
      */
     override protected function keyDownHandler(event:KeyboardEvent):void
     {
-        if (!enabled)
-            return;
-
+        // Have to make sure we don't move to a radio button that's not enabled
+        // because it's in a different container that is not enabled.
+
         switch (event.keyCode)
         {
             case Keyboard.DOWN:


Transferred from the Adobe Open Source Subversion Repository

Revision: 12478
Author:   gosmith@adobe.com
Date:     2009-12-04T01:03:50.724937Z

Log Message:
-----------
The partAdded() and partRemoved() methods of Spark components now dispatch new events named "partAdded" and "partRemoved", of type SkinPartEvent. The accessibility implementation classes will soon use these events to know when skin parts are added and removed so that they can attach and remove event handlers appropriately. This mechanism may change in a future release, so developers should not depend on these undocumented events.

I've made sure that all overrides of partAdded() and partRemoved() call the supermethod so that they dispatch these events.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TitleWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</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/SkinPartEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -1388,6 +1388,8 @@
      */
     override protected function partAdded(partName:String, instance:Object):void
     {
+        super.partAdded(partName, instance);
+
         if (instance == videoDisplay)
         {
             videoDisplay.addEventListener(TimeEvent.CURRENT_TIME_CHANGE, videoDisplay_currentTimeChangeHandler);
@@ -1613,6 +1615,8 @@
      */
     override protected function partRemoved(partName:String, instance:Object):void
     {
+		super.partRemoved(partName, instance);
+
         if (instance == videoDisplay)
         {
             // validate before doing anything with the videoDisplay.


Transferred from the Adobe Open Source Subversion Repository

Revision: 11921
Author:   rfrishbe@adobe.com
Date:     2009-11-18T01:20:35.060054Z

Log Message:
-----------
Unlike with FLVPlayback, sometimes videObject can be null (when the source hasn't been set yet).  We need to code for this case in our full screen handlers.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer2.as</path>

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

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -1840,9 +1840,8 @@
                 y: this.y,
                 width: this.getPreferredBoundsWidth(false),
                 height: this.getPreferredBoundsHeight(false),
-                smoothing: videoDisplay.videoObject.smoothing,
-                deblocking: videoDisplay.videoObject.deblocking,
                 includeInLayout: this.includeInLayout};
+
             includeInLayout = false;
             pauseWhenHidden = false;

@@ -1873,9 +1872,15 @@
             invalidateSize();
             invalidateDisplayList();

-            // this is for video performance reasons
-            videoDisplay.videoObject.smoothing = false;
-            videoDisplay.videoObject.deblocking = 0;
+            // this is for video performance reasons, but sometimes the videoObject isn't there
+            // if the source is null
+            if (videoDisplay.videoObject)
+            {
+                beforeFullScreenInfo.smoothing = videoDisplay.videoObject.smoothing;
+                beforeFullScreenInfo.deblocking = videoDisplay.videoObject.deblocking;
+                videoDisplay.videoObject.smoothing = false;
+                videoDisplay.videoObject.deblocking = 0;
+            }

             this.validateNow();

@@ -1982,8 +1987,14 @@
         this.y = beforeFullScreenInfo.y;
         this.setLayoutBoundsSize(beforeFullScreenInfo.width, beforeFullScreenInfo.height);

-        videoDisplay.videoObject.smoothing = beforeFullScreenInfo.smoothing;
-        videoDisplay.videoObject.deblocking = beforeFullScreenInfo.deblocking;
+        // sometimes there's no video object currently or there might not've been a
+        // video object when we went in to fullScreen mode.  There may be no videoObject
+        // if the source hasn't been set.
+        if (videoDisplay.videoObject && beforeFullScreenInfo.smoothing !== undefined)
+        {
+            videoDisplay.videoObject.smoothing = beforeFullScreenInfo.smoothing;
+            videoDisplay.videoObject.deblocking = beforeFullScreenInfo.deblocking;
+        }

         // remove from top level application:
         if (parent is IVisualElementContainer)


Transferred from the Adobe Open Source Subversion Repository

Revision: 8386
Author:   srahim@adobe.com
Date:     2009-07-06T19:50:00.014831Z

Log Message:
-----------
ASDoc updates for Spark components

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>

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

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -327,6 +327,26 @@
  *  contains a full-featured UI for controlling video playback.
  *
  *
VideoElement is the chromeless version.

+ *
+ *
The VideoPlayer control has the following default characteristics:

+ *

+ *

+ *           Characteristic
+ *           Description
+ *

+ *

+ *           Default size
+ *           263 pixels wide by 184 pixels high
+ *

+ *

+ *           Minimum size
+ *           0
+ *

+ *

+ *           Maximum size
+ *           10000 pixels wide and 10000 pixels high
+ *

+ *

  *
  *  @see spark.primitives.VideoElement
  *  @see spark.skins.spark.VideoPlayerSkin


Transferred from the Adobe Open Source Subversion Repository

Revision: 8238
Author:   smgilson@adobe.com
Date:     2009-06-25T17:25:59.965879Z

Log Message:
-----------
More post PARB ASDoc cleanup

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

Modified Paths:
--------------
<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/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -101,10 +101,10 @@

     private static function calculatePercentWidth(layoutElement:ILayoutElement, width:Number):Number
     {
-    	var percentWidth:Number = LayoutElementHelper.pinBetween(Math.round(layoutElement.percentWidth * 0.01 * width),
-    	                                                         layoutElement.getMinBoundsWidth(),
-    	                                                         layoutElement.getMaxBoundsWidth() );
-    	return percentWidth < width ? percentWidth : width;
+        var percentWidth:Number = LayoutElementHelper.pinBetween(Math.round(layoutElement.percentWidth * 0.01 * width),
+                                                                 layoutElement.getMinBoundsWidth(),
+                                                                 layoutElement.getMaxBoundsWidth() );
+        return percentWidth < width ? percentWidth : width;
     }

     private static function sizeLayoutElement(layoutElement:ILayoutElement, width:Number,
@@ -250,18 +250,20 @@
     [Inspectable(category="General", enumeration="left,right,center,justify,contentJustify", defaultValue="left")]

     /**
-     *  Horizontal alignment of layout elements.
-     *
-     *  If the value is one of "left", "right", "center"  then the
-     *  layout element is aligned relative to the target's contentWidth.
-     *
-     *  If the value is "contentJustify" then the layout element's actual
-     *  width is set to the contentWidth.
-     *
-     *  If the value is "justify" then the layout element's actual width
-     *  is set to the target's width.
+     *  The horizontal alignment of container children.
+     *  If the value is "left", "right", or "center" then the
+     *  child is aligned relative to the container's contentWidth property.
+     *
+     *
If the value is "contentJustify", then the child's actual
+     *  width is set to the contentWidth of the container.
+     *  The contentWidth of the container is the width of the largest child.
+     *  If all children are smaller than the width of the container,
+     *  then set the width of all the children to the width of the container.

+     *
+     *
If the value is "justify" then the child's actual width
+     *  is set to the container's width.

      *
-     *  This property does not affect the layout's measured size.
+     *
This property does not affect the layout's measured size.

      *
      *  @default "left"
      *
@@ -487,14 +489,14 @@
     [Inspectable(category="General")]

     /**
-     *  If variableRowHeight="false" then
-     *  this property specifies the actual height of each layout element.
-     *
-     *  If variableRowHeight="true" (the default), then this property
-     *  has no effect.
-     *
-     *  The default value of this property is the preferred height
-     *  of the typicalLayoutElement.
+     *  If variableRowHeight is false, then
+     *  this property specifies the actual height of each child.
+     *
+     *
If variableRowHeight is true,
+     *  the default, then this property has no effect.

+     *
+     *
The default value of this property is the preferred height
+     *  of the typicalLayoutElement.

      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -583,30 +585,30 @@
     [Inspectable(category="General")]
     [Bindable("indexInViewChanged")]

-	/**
-	 *  The index of the first layout element that's part of the
-	 *  layout and within the layout target's scrollRect, or -1
-	 *  if nothing has been displayed yet.
-	 *
-	 *  "Part of the layout" means that the element is non-null
-	 *  and that its includeInLayout property is true.
-	 *
-	 *  Note that the layout element may only be partially in view.
-	 *
-	 *  @see lastIndexInView
-	 *  @see fractionOfElementInView
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function get firstIndexInView():int
-	{
-		return _firstIndexInView;
-	}
-
-
+    /**
+     *  The index of the first layout element that is part of the
+     *  layout and within the layout target's scroll rectangle, or -1
+     *  if nothing has been displayed yet.
+     *
+     *
"Part of the layout" means that the element is non-null
+     *  and that its includeInLayout property is true.

+     *
+     *
Note that the layout element may only be partially in view.

+     *
+     *  @see lastIndexInView
+     *  @see fractionOfElementInView
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get firstIndexInView():int
+    {
+        return _firstIndexInView;
+    }
+
+
     //----------------------------------
     //  lastIndexInView
     //----------------------------------
@@ -619,27 +621,27 @@
     [Inspectable(category="General")]
     [Bindable("indexInViewChanged")]

-	/**
+    /**
      *  The index of the last row that's part of the layout and within
-     *  the layout target's scrollRect, or -1 if nothing has been displayed yet.
-     *
-     *  "Part of the layout" means that the element is non-null
-     *  and that its includeInLayout property is true.
-     *
-     *  Note that the row may only be partially in view.
+     *  the container's scroll rectangle, or -1 if nothing has been displayed yet.
+     *
+     *
"Part of the layout" means that the child is non-null
+     *  and that its includeInLayout property is true.

+     *
+     *
Note that the row may only be partially in view.

      *
      *  @see firstIndexInView
      *  @see fractionOfElementInView
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function get lastIndexInView():int
-	{
-		return _lastIndexInView;
-	}
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get lastIndexInView():int
+    {
+        return _lastIndexInView;
+    }

     /**
      *  Sets the firstIndexInView and lastIndexInView
@@ -693,45 +695,45 @@
         return llv.getBounds(index);
     }

-	/**
+    /**
      *  Returns 1.0 if the specified index is completely in view, 0.0 if
      *  it's not, and a value in between if the index is partially
      *  within the view.
      *
-	 *  An index is "in view" if the corresponding non-null layout element is
-	 *  within the vertical limits of the layout target's scrollRect
-	 *  and included in the layout.
-	 *
-	 *  If the specified index is partially within the view, the
-	 *  returned value is the percentage of the corresponding layout
-	 *  element that's visible.
-	 *
-	 *  Returns 0.0 if the specified index is invalid or if it corresponds to
-	 *  null element, or a ILayoutElement for which includeInLayout is false.
-	 *
-	 *  @return the percentage of the specified element that's in view.
-	 *  @see firstIndexInView
-	 *  @see lastIndexInView
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function fractionOfElementInView(index:int):Number
-	{
-		var g:GroupBase = GroupBase(target);
-	    if (!g)
-	        return 0.0;
-
-	    if ((index < 0) || (index >= g.numElements))
-	       return 0.0;
-
+     *  An index is "in view" if the corresponding non-null layout element is
+     *  within the vertical limits of the layout target's scrollRect
+     *  and included in the layout.
+     *
+     *  If the specified index is partially within the view, the
+     *  returned value is the percentage of the corresponding layout
+     *  element that's visible.
+     *
+     *  Returns 0.0 if the specified index is invalid or if it corresponds to
+     *  null element, or a ILayoutElement for which includeInLayout is false.
+     *
+     *  @return the percentage of the specified element that's in view.
+     *  @see firstIndexInView
+     *  @see lastIndexInView
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function fractionOfElementInView(index:int):Number
+    {
+        var g:GroupBase = GroupBase(target);
+        if (!g)
+            return 0.0;
+
+        if ((index < 0) || (index >= g.numElements))
+           return 0.0;
+
         if (!clipAndEnableScrolling)
             return 1.0;

-
-        var r0:int = firstIndexInView;
+
+        var r0:int = firstIndexInView;
         var r1:int = lastIndexInView;

         // outside the visible index range
@@ -743,21 +745,21 @@
             return 1.0;

         // get the layout element's Y and Height
-	    var eltY:Number;
-	    var eltHeight:Number;
-	    if (useVirtualLayout)
-	    {
-	        eltY = llv.start(index);
-	        eltHeight = llv.getMajorSize(index);
-	    }
-	    else
-	    {
+        var eltY:Number;
+        var eltHeight:Number;
+        if (useVirtualLayout)
+        {
+            eltY = llv.start(index);
+            eltHeight = llv.getMajorSize(index);
+        }
+        else
+        {
             var elt:ILayoutElement = g.getElementAt(index);
             if (!elt || !elt.includeInLayout)
                 return 0.0;
             eltY = elt.getLayoutBoundsY();
             eltHeight = elt.getLayoutBoundsHeight();
-	    }
+        }

         // So, index is either the first or last row in the scrollRect
         // and potentially partially visible.
@@ -772,26 +774,26 @@
         if ((iy0 >= y0) && (iy1 <= y1))
             return 1.0;
         return (Math.min(y1, iy1) - Math.max(y0, iy0)) / (iy1 - iy0);
-	}
-
-	/**
-     *  @private
-     *
-	 *  Binary search for the first layout element that contains y.
-	 *
-	 *  This function considers both the element's actual bounds and
-	 *  the gap that follows it to be part of the element.  The search
-	 *  covers index i0 through i1 (inclusive).
-	 *
-	 *  This function is intended for variable height elements.
-	 *
-	 *  Returns the index of the element that contains y, or -1.
-	 */
-	private static function findIndexAt(y:Number, gap:int, g:GroupBase, i0:int, i1:int):int
-	{
-	    var index:int = (i0 + i1) / 2;
-        var element:ILayoutElement = g.getElementAt(index);
-	    var elementY:Number = element.getLayoutBoundsY();
+    }
+
+    /**
+     *  @private
+     *
+     *  Binary search for the first layout element that contains y.
+     *
+     *  This function considers both the element's actual bounds and
+     *  the gap that follows it to be part of the element.  The search
+     *  covers index i0 through i1 (inclusive).
+     *
+     *  This function is intended for variable height elements.
+     *
+     *  Returns the index of the element that contains y, or -1.
+     */
+    private static function findIndexAt(y:Number, gap:int, g:GroupBase, i0:int, i1:int):int
+    {
+        var index:int = (i0 + i1) / 2;
+        var element:ILayoutElement = g.getElementAt(index);
+        var elementY:Number = element.getLayoutBoundsY();
         var elementHeight:Number = element.getLayoutBoundsHeight();
         // TBD: deal with null element, includeInLayout false.
         if ((y >= elementY) && (y < elementY + elementHeight + gap))
@@ -802,8 +804,8 @@
             return findIndexAt(y, gap, g, i0, Math.max(i0, index-1));
         else
             return findIndexAt(y, gap, g, Math.min(index+1, i1), i1);
-	}
-
+    }
+
     /**
      *  @private
      *
@@ -1590,11 +1592,11 @@
                 ((y < maxVisibleY) && ((y + dy) > minVisibleY)) ||
                 ((dy <= 0) && ((y == maxVisibleY) || (y == minVisibleY))))
             {
-            	visibleRows += 1;
-            	if (firstRowInView == -1)
-            	   firstRowInView = lastRowInView = index;
-            	else
-            	   lastRowInView = index;
+                visibleRows += 1;
+                if (firstRowInView == -1)
+                   firstRowInView = lastRowInView = index;
+                else
+                   lastRowInView = index;
             }
             y += dy + gap;
         }
@@ -1754,5 +1756,5 @@

 class LayoutElementFlexChildInfo extends FlexChildInfo
 {
-    public var layoutElement:ILayoutElement;
+    public var layoutElement:ILayoutElement;
 }


def: 6182 retrieve referrer when no referrer is passed

git-svn-id: 3f608e5a9a704dd448217c0a64c508e7f145cfa1@91874 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- kdp3Lib/src/com/kaltura/kdpfl/controller/LoadConfigCommand.as
+++ kdp3Lib/src/com/kaltura/kdpfl/controller/LoadConfigCommand.as
@@ -625,7 +625,7 @@
 					KTrace.getInstance().jsCallback = true;
 			}
 			//in this case if external interface enabled will look for referrer, otherwise referrer will be empty
-			if (_flashvars.disableReferrerOverride == "true") {
+			if (_flashvars.disableReferrerOverride == "true" || !_flashvars.referrer) {
 				if (_flashvars.externalInterfaceDisabled == "false" || _flashvars.externalInterfaceDisabled == "0")
 				{
 					var foundReferer:String = ExternalInterface.call('window.location.href.toString');


fix Viewport.visible to work even if it's not added on the Stage and no Stage3D is set

--- src/aerys/minko/render/Viewport.as
+++ src/aerys/minko/render/Viewport.as
@@ -73,13 +73,11 @@
 		 * @return
 		 *
 		 */
-		override public function get visible() : Boolean
-		{
-			return _stage3d.visible;
-		}
 		override public function set visible(value : Boolean) : void
 		{
-			_stage3d.visible = value;
+			if (_stage3d)
+				_stage3d.visible = value;
+
 			super.visible = value;
 		}

@@ -266,7 +264,7 @@
 			}
 			else
 			{
-				_stage3d.visible = true;
+				_stage3d.visible = visible;
 			}

 			stage.scaleMode = StageScaleMode.NO_SCALE;


Extending Object should be implicit.

Extending Object should be implicit.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@6138 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/util/Name.as
+++ src/as/com/threerings/util/Name.as
@@ -27,7 +27,7 @@
 import com.threerings.io.ObjectOutputStream;
 import com.threerings.io.Streamable;

-public class Name extends Object
+public class Name
     implements Comparable, Hashable, Streamable
 {
     public function Name (name :String = "")


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

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

 package mx.modules
 {