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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.rpc.soap.types
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5545
Author:   jimurphy@adobe.com
Date:     2009-03-25T19:00:52.330680Z

Log Message:
-----------
1st pass of rename according to the spec http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix

Flex now requires CSS Style declarations to declare @namespace rules and disambiguate between halo and spark components using CSS 3 namespace prefixes on type selectors. At compile time, this namespace information will be used to map type names to qualified ActionScript class names. At runtime, type selectors are matched on qualified ActionScript class name (for example mx.controls.Button rather than just Button). Flex 3 applications must be compiled with -compatibility-version=3.0.0 to get unqualified CSS type selector behavior.

QE: Yes, this build may help in updating test cases to use the new namespaces and class names.
Dev: Not yet
Doc: Not yet

Modified Paths:
--------------
748 paths were modified

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

--- frameworks/projects/spark/src/spark/events/ElementExistenceEvent.as
+++ frameworks/projects/spark/src/spark/events/ElementExistenceEvent.as
@@ -9,7 +9,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package mx.events
+package spark.events
 {

 import flash.events.Event;


Transferred from the Adobe Open Source Subversion Repository

Revision: 11538
Author:   aharui@adobe.com
Date:     2009-11-06T22:05:04.126452Z

Log Message:
-----------
If the dataProvider for a ListBase is a ViewStack and the ListBase is a ButtonBar, there is a scenario where, when an empty ViewStack is assigned its first child that the ViewStack adjusts its selectedIndex then the ListBase tries to adjust it again, putting it out of range.  Add a check to ListBase to keep the selectedIndex in range.

QE Notes: Might want to make sure there are tests of setting both selectedIndex and dataProvider (or resetting dataProvider) in same frame, and setting both in MXML
Doc Notes:
Bugs: SDK-23528
Reviewer: Ryan
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/gumbo/components/ButtonBar, List, mustella/containers/ViewStack.

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -1130,9 +1130,13 @@
             return;

         // If an item is added before the selected item, bump up our
-        // selected index backing variable.
+        // selected index backing variable. We check for valid values
+        // because there is a scenario when a ViewStack is the
+        // dataProvider and has its first child added that the ViewStack
+        // assigns selectedIndex to 0 then this code would
+        // bump it to 1.
         if (index <= selectedIndex)
-            adjustSelection(selectedIndex + 1);
+            adjustSelection(Math.min(selectedIndex + 1, dataProvider.length - 1));
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 16733
Author:   njaramil@adobe.com
Date:     2010-06-30T01:39:32.213019Z

Log Message:
-----------
Mobile theme tweaks:
- Modified default chrome and content background colors to fit light-on-dark theme.
- Tweaked button and action bar skins to improve appearance for I2--will still need further tweaking later.

QE notes:
Doc notes:
Bugs:
Reviewer: Jason SJ, Glenn
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarBorder.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/Button_bg_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarHighlight.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/Button_bg_down.fxg</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
@@ -21,7 +21,6 @@
     public var actionGroup:Group;
     public var titleDisplay:Label;
     private var highlight:Sprite;
-    private var border:Sprite;

     public function ActionBarSkin()
     {
@@ -36,23 +35,21 @@
         highlight = new ActionBarHighlight();
         addChild(highlight);

-        border = new ActionBarBorder();
-        addChild(border);
-
         navigationGroup = new Group();
         var hLayout:HorizontalLayout = new HorizontalLayout();
         hLayout.horizontalAlign = HorizontalAlign.LEFT;
-        hLayout.verticalAlign = VerticalAlign.CONTENT_JUSTIFY;
+        hLayout.verticalAlign = VerticalAlign.MIDDLE;
         hLayout.gap = 0;
+		hLayout.paddingLeft = hLayout.paddingTop = hLayout.paddingRight = hLayout.paddingBottom = 10;
         navigationGroup.layout = hLayout;
         addChild(navigationGroup);

         titleGroup = new Group();
         hLayout = new HorizontalLayout();
         hLayout.horizontalAlign = HorizontalAlign.LEFT;
-        hLayout.verticalAlign = VerticalAlign.CONTENT_JUSTIFY;
+		hLayout.verticalAlign = VerticalAlign.MIDDLE;
         hLayout.gap = 0;
-        hLayout.paddingLeft = 10;
+		hLayout.paddingLeft = hLayout.paddingTop = hLayout.paddingRight = hLayout.paddingBottom = 10;
         titleGroup.layout = hLayout;
         titleGroup.clipAndEnableScrolling = true;
         addChild(titleGroup);
@@ -60,8 +57,9 @@
         actionGroup = new Group();
         hLayout = new HorizontalLayout();
         hLayout.horizontalAlign = HorizontalAlign.RIGHT;
-        hLayout.verticalAlign = VerticalAlign.CONTENT_JUSTIFY;
+		hLayout.verticalAlign = VerticalAlign.MIDDLE;
         hLayout.gap = 0;
+		hLayout.paddingLeft = hLayout.paddingTop = hLayout.paddingRight = hLayout.paddingBottom = 10;
         actionGroup.layout = hLayout;
         addChild(actionGroup);

@@ -69,6 +67,7 @@
         titleDisplay.setStyle("fontSize", "18");
         titleDisplay.setStyle("verticalAlign", "middle");
         titleDisplay.setStyle("color", "0xFFFFFF");
+		titleDisplay.setStyle("fontWeight", "bold");
     }

     override protected function measure():void
@@ -80,9 +79,6 @@

     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        border.width = unscaledWidth;
-        border.height = unscaledHeight;
-
         highlight.width = unscaledWidth;
         highlight.height = unscaledHeight;

@@ -90,13 +86,13 @@
         var right:Number = unscaledWidth;

         // Position groups
-        if (navigationGroup.includeInLayout)
+        if (navigationGroup.numElements > 0 && navigationGroup.includeInLayout)
         {
             left += navigationGroup.measuredWidth;
             navigationGroup.setLayoutBoundsSize(left, unscaledHeight);
         }

-        if (actionGroup.includeInLayout)
+        if (actionGroup.numElements > 0 && actionGroup.includeInLayout)
         {
             right -= actionGroup.measuredWidth;
             actionGroup.setLayoutBoundsPosition(right, 0);


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

--- frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLightShader.as
+++ frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLightShader.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: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

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

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

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/managers/IFocusManagerComplexComponent.as
+++ frameworks/projects/framework/src/mx/managers/IFocusManagerComplexComponent.as
@@ -17,6 +17,11 @@
  *  that components that can have more than one internal focus target
  *  should implement in order to
  *  receive focus from the FocusManager.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public interface IFocusManagerComplexComponent extends IFocusManagerComponent
 {
@@ -34,6 +39,11 @@
 	 *  A flag that indicates whether the component currently has internal
 	 *  focusable targets
 	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	function get hasFocusableContent():Boolean;

@@ -51,6 +61,11 @@
 	 *  keyboard
 	 *
 	 *  @param direction "bottom" if TAB used with SHIFT key, "top" otherwise
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	function assignFocus(direction:String):void;


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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultGridHeaderRendererAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultGridHeaderRendererAutomationImpl.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.
 //
 ////////////////////////////////////////////////////////////////////////////////
 package spark.automation.delegates.skins.spark


added --verbose option to show more detailed output

--- src/ASConfigC.as
+++ src/ASConfigC.as
@@ -82,21 +82,10 @@
 					process.exit(1);
 				}
 			}
-			if(!this._configFilePath)
-			{
-				//try to find asconfig.json in the current working directory
-				var cwdConfigPath:String = path.resolve(process.cwd(), ASCONFIG_JSON);
-				if(fs.existsSync(cwdConfigPath))
-				{
-					this._configFilePath = cwdConfigPath;
-				}
-				else
-				{
-					//asconfig.json not found
-					console.error("asconfig.json not found in directory: " + process.cwd());
-					this.printUsage();
-					process.exit(1);
-				}
+			this.findConfig();
+			if(this._verbose)
+			{
+				console.info("Configuration file: " + this._configFilePath);
 			}
 			process.chdir(path.dirname(this._configFilePath));

@@ -140,6 +129,7 @@
 		private var _clean:Boolean = false;
 		private var _unpackageANEs:Boolean = false;
 		private var _debugBuild:Boolean = false;
+		private var _verbose:Boolean = false;
 		private var _sourcePaths:Vector.<String> = null;
 		private var _copySourcePathAssets:Boolean = false;
 		private var _airPlatform:String = null;
@@ -176,6 +166,7 @@
 			console.info(" --storepass PASSWORD                                The password used when signing and packaging an Adobe AIR application. If not specified, prompts for the password.");
 			console.info(" --unpackage-anes                                    Unpackage native extensions to the output directory when creating a debug build for the Adobe AIR simulator.");
 			console.info(" --clean                                             Clean the output directory. Will not build the project.")
+			console.info(" --verbose                                           Displays verbose output.")
 		}

 		private function parseArguments():void
@@ -265,6 +256,20 @@
 						else
 						{
 							this._clean = cleanValue as Boolean;
+						}
+						break;
+					}
+					case "verbose":
+					{
+						//support both --verbose=true or simply --verbose
+						var verboseValue:Object = args[key];
+						if(typeof verboseValue === "string")
+						{
+							this._verbose = verboseValue === "true";
+						}
+						else
+						{
+							this._verbose = verboseValue as Boolean;
 						}
 						break;
 					}
@@ -339,6 +344,10 @@

 		private function loadConfig():Object
 		{
+			if(this._verbose)
+			{
+				console.info("Reading configuration file...");
+			}
 			var schemaFilePath:String = path.join(__dirname, "..", "..", "schemas", "asconfig.schema.json");
 			try
 			{
@@ -359,6 +368,10 @@
 				console.error(error);
 				process.exit(1);
 			}
+			if(this._verbose)
+			{
+				console.info("Validating configuration file...");
+			}
 			try
 			{
 				var validate:Function = jsen(schemaData);
@@ -395,6 +408,29 @@
 				process.exit(1);
 			}
 			return configData;
+		}
+
+		private function findConfig():void
+		{
+			if(this._configFilePath)
+			{
+				//already found from arguments
+				return;
+			}
+
+			//try to find asconfig.json in the current working directory
+			var cwdConfigPath:String = path.resolve(process.cwd(), ASCONFIG_JSON);
+			if(fs.existsSync(cwdConfigPath))
+			{
+				this._configFilePath = cwdConfigPath;
+			}
+			else
+			{
+				//asconfig.json not found
+				console.error("asconfig.json not found in directory: " + process.cwd());
+				this.printUsage();
+				process.exit(1);
+			}
 		}

 		private function parseConfig():void
@@ -404,6 +440,10 @@
 			this._compilerOptionsJSON = null;
 			this._airOptionsJSON = null;
 			var configData:Object = this.loadConfig();
+			if(this._verbose)
+			{
+				console.info("Parsing configuration file...");
+			}
 			this._projectType = this.readProjectType(configData);
 			if(ASConfigFields.CONFIG in configData)
 			{
@@ -749,6 +789,10 @@
 			}

 			this._outputIsJS = (this._sdkIsRoyale || sdkIsFlexJS) && !this._isSWFTargetOnly;
+			if(this._verbose)
+			{
+				console.info("SDK: " + this._sdkHome);
+			}
 		}

 		private function findCompilerJarPath():String
@@ -795,6 +839,11 @@
 			if(!this._clean)
 			{
 				return;
+			}
+
+			if(this._verbose)
+			{
+				console.info("Cleaning project...");
 			}

 			var outputDirectory:String = findOutputDirectory(this._mainFile, this._outputPath, !this._outputIsJS);
@@ -852,6 +901,10 @@

 			if(fs.existsSync(outputDirectory))
 			{
+				if(this._verbose)
+				{
+					console.info("Deleting: " + outputDirectory);
+				}
 				try
 				{
 					del.sync([outputDirectory]);
@@ -866,6 +919,17 @@

 		private function compileProject():void
 		{
+			if(this._verbose)
+			{
+				if(this._projectType == ProjectType.LIB)
+				{
+					console.info("Compiling library...");
+				}
+				else //app
+				{
+					console.info("Compiling application...");
+				}
+			}
 			var jarPath:String = this.findCompilerJarPath();
 			if(!jarPath)
 			{
@@ -924,6 +988,10 @@
 						command += escapePath(file, false);
 					}
 				}
+				if(this._verbose)
+				{
+					console.info(command);
+				}
 				var result:Object = child_process.execSync(command,
 				{
 					stdio: "inherit",
@@ -946,6 +1014,10 @@

 		private function copySourcePathAssetToOutputDirectory(assetPath:String, mainFile:String, sourcePaths:Vector.<String>, outputDirectory:String):void
 		{
+			if(this._verbose)
+			{
+				console.info("Copying asset: " + assetPath);
+			}
 			var content:Object = fs.readFileSync(assetPath);
 			var targetPath:String = assetPathToOutputPath(assetPath, mainFile, sourcePaths, outputDirectory);
 			mkdirp["sync"](path.dirname(targetPath));
@@ -985,6 +1057,14 @@
 			}
 			var assetPaths:Array = findSourcePathAssets(this._mainFile, sourcePaths, outputDirectory, excludes);
 			var assetCount:int = assetPaths.length;
+			if(assetCount === 0)
+			{
+				return;
+			}
+			if(this._verbose)
+			{
+				console.info("Copying source path assets...");
+			}
 			for(i = 0; i < assetCount; i++)
 			{
 				var assetPath:String = assetPaths[i];
@@ -1010,6 +1090,10 @@
 			if(!this._htmlTemplate)
 			{
 				return;
+			}
+			if(this._verbose)
+			{
+				console.info("Copying HTML template...");
 			}
 			if(!fs.existsSync(this._htmlTemplate))
 			{
@@ -1100,6 +1184,11 @@
 			{
 				return;
 			}
+
+			if(this._verbose)
+			{
+				console.info("Processing Adobe AIR application descriptor(s)...");
+			}

 			var populateTemplate:Boolean = false;
 			if(this._airDescriptors == null || this._airDescriptors.length == 0)
@@ -1108,6 +1197,10 @@
 				var templatePath:String = path.resolve(this._sdkHome, "templates/air/descriptor-template.xml");
 				this._airDescriptors.push(templatePath);
 				populateTemplate = true;
+				if(this._verbose)
+				{
+					console.info("Using template fallback: " + templatePath);
+				}
 			}
 			var outputDir:String = findOutputDirectory(this._mainFile, this._outputPath, !this._outputIsJS);
 			var contentValue:String = findApplicationContent(this._mainFile, this._outputPath, !this._outputIsJS);
@@ -1116,10 +1209,18 @@
 				console.error("Failed to find content for application descriptor.");
 				process.exit(1);
 			}
+			if(this._verbose)
+			{
+				console.info("Initial window content: " + contentValue);
+			}
 			var descriptorCount:int = this._airDescriptors.length;
 			for(var i:int = 0; i < descriptorCount; i++)
 			{
 				var airDescriptor:String = this._airDescriptors[i];
+				if(this._verbose)
+				{
+					console.info("Descriptor: " + airDescriptor);
+				}
 				var descriptor:String = fs.readFileSync(airDescriptor, "utf8") as String;
 				if(populateTemplate)
 				{
@@ -1128,6 +1229,10 @@
 					{
 						console.error("Failed to generate application ID for Adobe AIR.");
 						process.exit(1);
+					}
+					if(this._verbose)
+					{
+						console.info("Generated application ID: " + appID);
 					}
 					descriptor = populateAdobeAIRDescriptorTemplateFile(descriptor, appID);
 				}
@@ -1179,19 +1284,37 @@
 				return;
 			}

+			var anes:Vector.<String> = new <String>[];
 			if(CompilerOptions.LIBRARY_PATH in this._compilerOptionsJSON)
 			{
 				var libraryPathJSON:Array = this._compilerOptionsJSON[CompilerOptions.LIBRARY_PATH] as Array;
-				this.unpackANEs(libraryPathJSON);
+				this.findANEs(libraryPathJSON, anes);
 			}
 			if(CompilerOptions.EXTERNAL_LIBRARY_PATH in this._compilerOptionsJSON)
 			{
 				var externalLibraryPathJSON:Array = this._compilerOptionsJSON[CompilerOptions.EXTERNAL_LIBRARY_PATH] as Array;
-				this.unpackANEs(externalLibraryPathJSON);
-			}
-		}
-
-		private function unpackANEs(libraryPathJSON:Array):void
+				this.findANEs(externalLibraryPathJSON, anes);
+			}
+
+			var aneCount:int = anes.length;
+			if(aneCount === 0)
+			{
+				return;
+			}
+
+			if(this._verbose)
+			{
+				console.info("Unpacking Adobe AIR native extensions...");
+			}
+
+			for(var i:int = 0; i < aneCount; i++)
+			{
+				var anePath:String = anes[i];
+				this.unpackANE(anePath);
+			}
+		}
+
+		private function findANEs(libraryPathJSON:Array, result:Vector.<String>):void
 		{
 			var pathCount:int = libraryPathJSON.length;
 			for(var i:int = 0; i < pathCount; i++)
@@ -1200,7 +1323,7 @@
 				libraryPath = path.resolve(libraryPath);
 				if(libraryPath.endsWith(FILE_EXTENSION_ANE))
 				{
-					this.unpackANE(libraryPath);
+					result.push(libraryPath);
 				}
 				else if(fs.statSync(libraryPath).isDirectory())
 				{
@@ -1212,7 +1335,7 @@
 						var fullPath:String = path.resolve(libraryPath, file);
 						if(fullPath.endsWith(FILE_EXTENSION_ANE))
 						{
-							this.unpackANE(fullPath);
+							result.push(fullPath);
 						}
 					}
 				}
@@ -1226,6 +1349,11 @@
 				//this is either an ANE that's already unpacked
 				//...or something else entirely
 				return;
+			}
+
+			if(this._verbose)
+			{
+				console.info("Unpacking: " + aneFilePath);
 			}

 			var outputDir:String = findOutputDirectory(this._mainFile, this._outputPath, !this._outputIsJS);
@@ -1267,6 +1395,16 @@
 			var outputDir:String = findOutputDirectory(this._mainFile, this._outputPath, !this._outputIsJS);
 			var filesJSON:Array = this._airOptionsJSON.files as Array;
 			var fileCount:int = filesJSON.length;
+			if(fileCount === 0)
+			{
+				return;
+			}
+
+			if(this._verbose)
+			{
+				console.info("Copying Adobe AIR application files...")
+			}
+
 			for(var i:int = 0; i < fileCount; i++)
 			{
 				var fileJSON:Object = filesJSON[i];
@@ -1345,6 +1483,10 @@

 		private function packageAIR():void
 		{
+			if(this._verbose)
+			{
+				console.info("Packaging Adobe AIR application...");
+			}
 			if(this._storepass !== null)
 			{
 				var storepassIndex:int = this._airArgs.indexOf("-" + SigningOptions.STOREPASS);
@@ -1369,6 +1511,10 @@
 			try
 			{
 				var command:String = escapePath(this._javaExecutable) + " " + this._airArgs.join(" ");
+				if(this._verbose)
+				{
+					console.info(command);
+				}
 				var result:Object = child_process.execSync(command,
 				{
 					stdio: "inherit",


Worked on secured passwords

Worked on secured passwords

git-svn-id: 27326a786375daad9d33dc990c6f272e4c8f567c@1568 fda5f131-174c-0410-8613-e0905860106b

--- org.openwms/trunk/org.openwms.core/org.openwms.core.domain.as/src/main/flex/org/openwms/core/domain/system/usermanagement/User.as
+++ org.openwms/trunk/org.openwms.core/org.openwms.core.domain.as/src/main/flex/org/openwms/core/domain/system/usermanagement/User.as
@@ -58,6 +58,15 @@
         }

         /**
+         * Do NOT allow to change the password this way.
+         *
+         * @param value The password
+         */
+        override public function set password(value : String) : void {
+            ;
+        }
+
+        /**
          * Check whether the User has UserDetails.
          *
          * @param userData The User to check


Some awful documentation for RectUtil

Some awful documentation for RectUtil

--- raw/src/org/yellcorp/lib/geom/RectUtil.as
+++ raw/src/org/yellcorp/lib/geom/RectUtil.as
@@ -5,8 +5,24 @@
 import flash.geom.Rectangle;

+/**
+ * Utility functions for manipulating rectangle-like objects, being any object
+ * that has numeric x, y, width and height properties.  DisplayObjects can be
+ * used, with the assumption that their registration points are in the top-left
+ * corner, and their width and height values are reliable.
+ */
 public class RectUtil
 {
+    /**
+     * Multiplies each coordinate in a rectangle by a scalar value.
+     *
+     * @param rect    The rectangle-like object to scale.
+     * @param factor  The number to multiply by.
+     * @param out     An optional instance to store the result in.  If not
+     *                provided, a new Rectangle is created.
+     *
+     * @return  The object containing the multiplied rectangle.
+     */
     public static function multiply(
         rect:Object, factor:Number, out:Object = null):Object
     {
@@ -18,6 +34,27 @@
         return out;
     }

+
+    /**
+     * Applies a non-skew linear transformation to each coordinate in a
+     * rectangle.  This is equivalent to transforming a rectangle by a Matrix,
+     * with the restriction that its b and c
+     * properties are fixed at zero.
+     *
+     * @param rect     The rectangle-like object to transform.
+     * @param xFactor  The number to multiply the x and width by.  This is
+     *                 equivalent to a Matrix's a property.
+     * @param yFactor  The number to multiply the y and height by.  This is
+     *                 equivalent to a Matrix's d property.
+     * @param xOffset  The number to add to the resultant x.  This is
+     *                 equivalent to a Matrix's tx property.
+     * @param yOffset  The number to add to the resultant y.  This is
+     *                 equivalent to a Matrix's ty property.
+     * @param out      An optional instance to store the result in.  If not
+     *                 provided, a new Rectangle is created.
+     *
+     * @return  The object containing the transformed rectangle.
+     */
     public static function transform(
         rect:Object,
         xFactor:Number, yFactor:Number,
@@ -191,6 +228,17 @@
     }

+    /**
+     * Rounds each coordinate of a rectangle to the next integer away from its
+     * center.  The result is the smallest rectangle with integral coordinates
+     * that can entirely contain the input rectangle.
+     *
+     * @param rect    The rectangle-like object to round.
+     * @param out     An optional instance to store the result in.  If not
+     *                provided, a new Rectangle is created.
+     *
+     * @return  The object containing the rectangle with integral coordinates.
+     */
     public static function roundOut(
         rect:Object, out:Object = null):Object
     {
@@ -205,6 +253,18 @@
         return out;
     }

+
+    /**
+     * Rounds each coordinate of a rectangle to the next integer toward its
+     * center.  The result is the largest rectangle with integral coordinates
+     * that can fit entirely within the input rectangle.
+     *
+     * @param rect    The rectangle-like object to round.
+     * @param out     An optional instance to store the result in.  If not
+     *                provided, a new Rectangle is created.
+     *
+     * @return  The object containing the rectangle with integral coordinates.
+     */
     public static function roundIn(
         rect:Object, out:Object = null):Object
     {
@@ -219,6 +279,18 @@
         return out;
     }

+
+    /**
+     * Maps a point from one rectangle space to another.
+     *
+     * @param point   The input point.
+     * @param source  The source rectangle space.
+     * @param target  The target rectangle space.
+     * @param out     An optional instance to store the result in.  If not
+     *                provided, a new Point is created.
+     *
+     * @return  The object containing the mapped point.
+     */
     public static function mapPoint(point:Object,
         source:Object, target:Object, out:Object = null):Object
     {
@@ -228,6 +300,18 @@
         return out;
     }

+
+    /**
+     * Maps a rectangle from one rectangle space to another.
+     *
+     * @param rect    The input rectangle.
+     * @param source  The source rectangle space.
+     * @param target  The target rectangle space.
+     * @param out     An optional instance to store the result in.  If not
+     *                provided, a new Rectangle is created.
+     *
+     * @return  The object containing the mapped rectangle.
+     */
     public static function mapRect(
         rect:Object, source:Object, target:Object, out:Object = null):Object
     {
@@ -239,6 +323,18 @@
         return out;
     }

+
+    /**
+     * Restricts the range of a point's x and y coordinates so the point falls
+     * with a given rectangle.
+     *
+     * @param point  The point to limit.
+     * @param rect   The rectangular limit.
+     * @param out    An optional instance to store the result in.  If not
+     *               provided, a new Point is created.
+     *
+     * @return  The object containing the clamped point.
+     */
     public static function clampPoint(
         point:Object, rect:Object, out:Object = null):Object
     {
@@ -256,6 +352,21 @@
     }

+    /**
+     * Returns a point in a rectangle, given an x and y coordinate in the range
+     * (0, 0) representing the rectangle's top-left corner, to (1, 1)
+     * representing the bottom-right.
+     *
+     * @param rect   The input rectangle.
+     * @param xParam The X parameter, with 0 representing the rectangle's left,
+     *               1 the right.
+     * @param yParam The Y parameter, with 0 representing the rectangle's top,
+     *               1 the bottom.
+     * @param out    An optional instance to store the result in.  If not
+     *               provided, a new Point is created.
+     *
+     * @return  The object containing the point.
+     */
     public static function getNormalizedPoint(
         rect:Object, xParam:Number, yParam:Number, out:Object = null):Object
     {
@@ -266,6 +377,17 @@
     }

+    /**
+     * Scales a rectangle to have a specified area, maintaining its aspect
+     * ratio.
+     *
+     * @param rect  The rectangle to scale.
+     * @param area  The desired area.
+     * @param out   An optional instance to store the result in.  If not
+     *              provided, a new Rectangle is created.
+     *
+     * @return  The object containing the rectangle with the desired area.
+     */
     public static function scaleToArea(
         rect:Object, area:Number, out:Object = null):Object
     {


Add a light bray box behind the show edges and layout toggles per Mia's suggestions.

--- asn_visualization/asn_visualization.as
+++ asn_visualization/asn_visualization.as
@@ -6,6 +6,7 @@
     import flare.analytics.graph.ShortestPaths;
     import flare.display.DirtySprite;
     import flare.display.TextSprite;
+    import flare.display.RectSprite;
     import flare.query.methods.update;
     import flare.vis.Visualization;
     import flare.vis.controls.ClickControl;
@@ -127,7 +128,9 @@

 		private static const _printing_mode_default_setting:Boolean=false;  // Set to true to enable hiding instruction so graphs look better printed
 		private static var _printing_mode:Boolean=false;
-
+
+		private static var _toggle_rect_background:RectSprite;
+
         public function visualize(data:Data):void
         {
             vis=new Visualization(data);
@@ -184,7 +187,9 @@
                     previously_clicked_node=null;
                     vis.update();
                 }));
-
+
+			create_toggle_rect_background();
+
             // add mouse-over details
             vis.controls.add(new HoverControl(NodeSprite, HoverControl.MOVE_TO_FRONT, function(evt:SelectionEvent):void
                 {
@@ -213,6 +218,15 @@
             layout();
             vis.update();
         }
+
+        private function create_toggle_rect_background():void
+        {
+			_toggle_rect_background = new RectSprite(0,0, 600, 30);
+			_toggle_rect_background.fillColor = 0XFFF1F1F1;
+			_toggle_rect_background.lineColor = 0XFFF1F1F1;
+			_toggle_rect_background.cornerSize = 10;
+			addChild(_toggle_rect_background);
+    	}

 		private function hideInfoForPrinting():void
 		{
@@ -746,6 +760,7 @@
             if (_edges_toogle_container)
             {
                 _edges_toogle_container.y=button_y_pos;
+                _edges_toogle_container.x = 3;
             }

             if (_layout_format_toggle_container)


Transferred from the Adobe Open Source Subversion Repository

Revision: 8434
Author:   dloverin@adobe.com
Date:     2009-07-07T20:15:32.903944Z

Log Message:
-----------
Initialize the statusBar after it is added to the application or window.

Spark Window and Spark WindowedApplication:
Added some code to partAdded to initialize a newly created status bar based on the value of showStatusBar.

QE Notes: Please verify the Spark Window is working as well as Spark WindowedApplication. They both had the bug.
Doc Notes: none.
Bugs: SDK-22113
Reviewer: Glenn
tests: checkintests

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

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

--- frameworks/projects/airspark/src/spark/components/Window.as
+++ frameworks/projects/airspark/src/spark/components/Window.as
@@ -1695,7 +1695,13 @@
     {
         super.partAdded(partName, instance);

-        if (instance == titleBar)
+        if (instance == statusBar)
+        {
+            statusBar.visible = _showStatusBar;
+            statusBar.includeInLayout = _showStatusBar;
+            showStatusBarChanged = false;
+        }
+        else if (instance == titleBar)
         {
             if (!nativeWindow.closed)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6186
Author:   dloverin@adobe.com
Date:     2009-04-21T20:55:09.555990Z

Log Message:
-----------
Implement backgroundColor property using a uint instead of a style.

Updated Spark Application and Spark Window.

QE Notes: None.
Doc Notes: None.
Bugs:
Reviewer: Glenn
tests: checkintests

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

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

--- frameworks/projects/airspark/src/spark/components/Window.as
+++ frameworks/projects/airspark/src/spark/components/Window.as
@@ -309,7 +309,7 @@
 //--------------------------------------

 /**
- *  The frameworks must be initialized by SystemManager.
+ *  The frameworks must be initialized by WindowedSystemManager.
  *  This factoryClass will be automatically subclassed by any
  *  MXML applications that don't explicitly specify a different
  *  factoryClass.
@@ -329,11 +329,11 @@
  *  in an AIR desktop application.
  *
  *
The Window container is a special kind of container in the sense
- *  that it cannot be used within other layout containers. An mx:Window
+ *  that it cannot be used within other layout containers. An spark.components.Window
  *  component must be the top-level component in its MXML document.

  *
  *
The easiest way to use a Window component to define a native window is to
- *  create an MXML document with an <mx:Window> tag
+ *  create an MXML document with an <s:Window> tag
  *  as the top-level tag in the document. You use the Window component
  *  just as you do any other container, including specifying the layout
  *  type, defining child controls, and so forth. Like any other custom
@@ -365,11 +365,11 @@
  *
  *  @mxml
  *
- *
The <mx:Window> tag inherits all of the tag
+ *
The <s:Window> tag inherits all of the tag
  *  attributes of its superclass and adds the following tag attributes:

  *
  *

- *  <mx:Window
+ *  <s:Window
  *    Properties
  *    alwaysInFront="false"
  *    backgroundColor="white"
@@ -1045,13 +1045,17 @@
     //  backgroundColor
     //----------------------------------

-    [Inspectable(category="General", format="Color")]
+    private var _backgroundColor:uint = 0xFFFFFF;
+
+    [Inspectable(category="General", format="Color", defaultValue="0xFFFFFF")]
     [Bindable("backgroundColorUpdated")]

     /**
      *  Background color of a component.
      *  This property specifies the background color, both while the application
      *  loads, and while it is running.
+     *
+     *  @default 0xFFFFFF
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1060,7 +1064,7 @@
      */
     public function get backgroundColor():uint
     {
-        return getStyle("backgroundColor");
+        return _backgroundColor;
     }

     /**
@@ -1068,10 +1072,10 @@
      */
     public function set backgroundColor(value:uint):void
     {
-        if (value == getStyle("backgroundColor"))
+        if (value == _backgroundColor)
             return;

-        setStyle("backgroundColor", value);
+        _backgroundColor = value;

         dispatchEvent(new Event("backgroundColorUpdated"));
     }


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

--- frameworks/projects/mx/src/mx/skins/halo/TitleBackground.as
+++ frameworks/projects/mx/src/mx/skins/halo/TitleBackground.as
@@ -0,0 +1,109 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.skins.halo
+{
+
+import flash.display.GradientType;
+import flash.display.Graphics;
+import mx.skins.ProgrammaticSkin;
+import mx.styles.StyleManager;
+import mx.utils.ColorUtil;
+
+/**
+ *  The skin for a title bar area of a Panel.
+ */
+public class TitleBackground extends ProgrammaticSkin
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function TitleBackground()
+	{
+		super();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override protected function updateDisplayList(w:Number, h:Number):void
+	{
+		super.updateDisplayList(w, h);
+
+		var borderAlpha:Number = getStyle("borderAlpha");
+		var cornerRadius:Number = getStyle("cornerRadius");
+		var highlightAlphas:Array = getStyle("highlightAlphas");
+		var headerColors:Array = getStyle("headerColors");
+		var showChrome:Boolean = headerColors != null;
+        StyleManager.getColorNames(headerColors);
+
+		var colorDark:Number = ColorUtil.adjustBrightness2(
+			headerColors ? headerColors[1] : 0xFFFFFF, -20);
+
+		var g:Graphics = graphics;
+
+		g.clear();
+
+		if (h < 3)
+			return;
+
+		// Only draw the background if headerColors are defined.
+		if (showChrome)
+		{
+			g.lineStyle(0, colorDark, borderAlpha);
+			g.moveTo(0, h);
+			g.lineTo(w, h);
+			g.lineStyle(0, 0, 0);
+
+			// surface
+			drawRoundRect(
+				0, 0, w, h,
+				{ tl: cornerRadius, tr: cornerRadius, bl: 0, br: 0 },
+				headerColors, borderAlpha,
+				verticalGradientMatrix(0, 0, w, h));
+
+			// highlight
+			drawRoundRect(
+				0, 0, w, h / 2,
+				{ tl: cornerRadius, tr: cornerRadius, bl: 0, br: 0 },
+				[ 0xFFFFFF, 0xFFFFFF ], highlightAlphas,
+				verticalGradientMatrix(0, 0, w, h / 2));
+
+				// edge
+			drawRoundRect(
+				0, 0, w, h,
+				{ tl: cornerRadius, tr: cornerRadius, bl: 0, br: 0 },
+				0xFFFFFF, highlightAlphas[0], null,
+				GradientType.LINEAR, null,
+				{ x: 0, y: 1, w: w, h: h - 1,
+				  r: { tl: cornerRadius, tr: cornerRadius, bl: 0, br: 0 } });
+
+		}
+
+
+	}
+}
+
+}


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

--- frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as
@@ -1,14 +1,21 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
 //
-////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////

 package mx.charts.chartClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 21839
Author:   jszeto@adobe.com
Date:     2011-08-04T22:35:00.199381Z

Log Message:
-----------
SpinnerList Bug Fixes

SDK-30904 - SpinnerList dispatches "change" event on programmatic selectedIndex changes

Call setSelectedIndex after a user interaction change

SDK-30961 - SpinnerList should use a less common property name when deciding if an item is disabled

Changed from using "enabled" to "_enabled_". Added static constant to SpinnerList.

SDK-30998 - SpinnerListContainerSkin.layoutContents calls setElementPosition() before setElementSize()

QE notes: none
Doc notes: none
Bugs: SDK-30904, SDK-30961, SDK-30998
Reviewer: Tom K
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/layouts/VerticalSpinnerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/modules/compiler/src/java/flex2/compiler/common/DefaultsConfigurator.java</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as
+++ frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as
@@ -80,6 +80,7 @@
 	//--------------------------------------------------------------------------

 	mx_internal static const FORCE_NO_WRAP_ELEMENTS_CHANGE:String = "forceNoWrapElementsChange";
+    mx_internal static const ENABLED_PROPERTY_NAME:String = "_enabled_";

 	private var scrollToSelection:Boolean = false;
 	private var numElementsChanged:Boolean = false;
@@ -233,9 +234,7 @@
 	}

 	override protected function commitSelection(dispatchChangedEvents:Boolean=true):Boolean
-	{
-		dispatchChangeAfterSelection = true;
-
+	{
 		var result:Boolean = super.commitSelection(dispatchChangedEvents);

 		// SnapElement requires a layout pass in order to properly center the selection
@@ -333,7 +332,7 @@
 		if (spinnerLayout)
 		{
 			var centerElementIndex:int = spinnerLayout.getIndexAtVerticalCenter();
-			selectedIndex = centerElementIndex;
+			setSelectedIndex(centerElementIndex, true);
 		}
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3522
Author:   jimurphy@adobe.com
Date:     2008-10-08T19:35:01.705756Z

Log Message:
-----------
rename of the rename:
-FxItemsComponent to FxContainer
-FxDataComponent to FxDataContainer
-FxItemsComponentSkin to FxContainerSkin
-FxDataComponentSkin to FxDataContainerSkin
-FxSelector to FxListBase

Modified Paths:
--------------
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxItemsComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDataComponentSkin.mxml" copyfrom-rev="3519" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDataContainerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxSelector.as" copyfrom-rev="3519" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxSelectorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxApplication.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxItemsComponentSkin.mxml" copyfrom-rev="3519" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxContainerSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/flex4/flex4test.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxSelector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataComponent.as" copyfrom-rev="3519" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDataComponentSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxItemsComponent.as" copyfrom-rev="3519" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
@@ -29,7 +29,7 @@
  * data content. This class is not typically instantiated in MXML. It is primarily
  * used as a base class, or as a SkinPart.
  */
-public class FxDataComponent extends FxContainerBase
+public class FxDataContainer extends FxContainerBase
 {
     include "../core/Version.as";

@@ -42,7 +42,7 @@
     /**
      *  Constructor.
      */
-	public function FxDataComponent()
+	public function FxDataContainer()
 	{
 		super();


Transferred from the Adobe Open Source Subversion Repository

Revision: 18131
Author:   hmuller@adobe.com
Date:     2010-10-11T22:43:35.924917Z

Log Message:
-----------
IDataGridElement and some minor Doc/API changes:

Defined IDataGridElement.  Grid and ColumnHeaderBar implement it.

Removed the Grid gridOwner property.  The IDataGridElement dataGrid property serves the same purpose.

Added public grid ColumnHeaderBar property that's set/cleared by DataGrid partAdded/Removed().  ColumnHeaderBar is now responsible for syncing its scroll position with its grid.

Removed DataGrid headerRenderer property and headerColunmSeparator skin part.  These values can be changed by reconfiguring the default skin.

Corrected GridItemEditor event type metadata in DataGrid.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IDataGridElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ColumnHeaderBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/GridItemEditorEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DataGridSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DataGridSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ColumnHeaderBarLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
@@ -200,7 +200,7 @@
      */
     private function get dataGrid():spark.components.DataGrid
     {
-        return (grid) ? grid.gridOwner as DataGrid : null;
+        return (grid) ? grid.dataGrid : null;
     }

     //----------------------------------
@@ -353,11 +353,7 @@
      */
     public function get headerRenderer():IFactory
     {
-        if (_headerRenderer)
-            return _headerRenderer;
-
-        const dataGrid:DataGrid = dataGrid;
-        return (dataGrid) ? dataGrid.headerRenderer : null;
+        return _headerRenderer;
     }

     /**
@@ -472,8 +468,8 @@
      *  this column.

      *  If this property is null, and the column grid's owner is a DataGrid,
-     *  then the value of the DataGrid's itemEditor property is used.   The
-     *  default DataGrid item editor is TextGridItemEditor.
+     *  then the value of the DataGrid's itemEditor property is used.   If no
+     *  item editor is specified then TextGridItemEditor is used.
      *
      *  @default null
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 16623
Author:   klin@adobe.com
Date:     2010-06-23T00:45:44.447218Z

Log Message:
-----------
The following changes apply to Spark DataGrid only.   Code reviews have been deferred until the implementation is closer to completion.

First check-in for GridDimensions implementation and accompanying classes. GridLayout now has basic support for variable row heights and column widths. New classes include:

-GridRowList - an open linked list implementation for caching the row heights.
-GridRowNode - a node that represents the cell heights of a particular row.

I've also included the first round of ASDoc for GridDimensions.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridDimensions.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridRowNode.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridRowList.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -243,7 +243,11 @@

         // HACK
         gridDimensions.rowCount = grid.dataProvider ? grid.dataProvider.length : 0;
-        gridDimensions.columnCount = grid.columns ? grid.columns.length : 0;
+        var numCols:int = gridDimensions.columnCount = grid.columns ? grid.columns.length : 0;
+
+        // HACK #2 - copy column explicit widths to gridDimensions
+        for (var i:int = 0; i < numCols; i++)
+            gridDimensions.setColumnWidth(i, GridColumn(grid.columns.getItemAt(i)).width);

         // Layout the item renderers and compute new values for visibleRowIndices et al

@@ -359,7 +363,7 @@
     private function getDataProviderItem(rowIndex:int):Object
     {
         const dataProvider:IList = grid.dataProvider;
-        if ((dataProvider == null) || (rowIndex >= dataProvider.length))
+        if ((dataProvider == null) || (rowIndex >= dataProvider.length) || (rowIndex < 0))
             return null;

         return dataProvider.getItemAt(rowIndex);


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

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


Changed HLS error message.

Changed HLS error message.

--- basicplayer/PlayerHLS.as
+++ basicplayer/PlayerHLS.as
@@ -55,7 +55,7 @@
 		}

 		private function _errorHandler(event:HLSEvent):void {
-			var msg:String = event.error.toString();
+			var msg:String = event.error.msg.toString();
 			if (msg.indexOf("Cannot load M3U8") != -1)
 				msg += "\nThe resource is unavailable or unreachable.";
 			else


Transferred from the Adobe Open Source Subversion Repository

Revision: 17059
Author:   cframpto@adobe.com
Date:     2010-07-26T16:12:14.542891Z

Log Message:
-----------
Add missing </p> to get label so asdoc builds without errors.

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRenderer.as
@@ -50,7 +50,7 @@
      *
The GridItemRenderer class automatically copies the
      *  value of this property to the text property of its labelDisplay.
      *  The Grid sets the label to the value returned by the column's
-     *  itemToLabel() method.
+     *  itemToLabel() method.

      *
      *  @langversion 3.0
      *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 17611
Author:   klin@adobe.com
Date:     2010-09-08T19:01:35.509943Z

Log Message:
-----------
Fix for rotation issues with explicit width and explicit height for Catalyst. The issue is that when we try to solve width and height such that the post transform bounds satisfy the layout constraints, we only took into account the measured width/height even when there was an explicit size specified. In the case of rotation, it is possible at times to use the explicit width/height to find a fit. Thus, the fix is to try to find a solution first using the explicit size. If no solution exists, then we relax the constraint on the size and try to find other solutions.

QE notes: No
Doc notes: No
Bugs: SDK-26614
Reviewer: Evtim
Tests run: checkintests, full cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/Rect.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -4065,6 +4065,7 @@

         // Calculate the width and height pre-transform:
         var newSize:Point = MatrixUtil.fitBounds(width, height, m,
+                                                 explicitWidth, explicitHeight,
                                                  preferredWidthPreTransform(),
                                                  preferredHeightPreTransform(),
                                                  minWidth, minHeight,
@@ -4100,6 +4101,7 @@

         // Calculate the width and height pre-transform:
         var newSize:Point = MatrixUtil.fitBounds(width, height, m,
+                                                 explicitWidth, explicitHeight,
                                                  preferredWidthPreTransform(),
                                                  preferredHeightPreTransform(),
                                                  minWidth, minHeight,
@@ -4339,6 +4341,7 @@
         else
         {
             var newSize:Point = MatrixUtil.fitBounds(width, height, m,
+                                                     explicitWidth, explicitHeight,
                                                      preferredWidthPreTransform(),
                                                      preferredHeightPreTransform(),
                                                      minWidth, minHeight,


Make trace_properties.as detect and display props that are hidden with flags

--- test/trace/trace_properties.as
+++ test/trace/trace_properties.as
@@ -203,6 +203,23 @@
   {
     var prop = all[i];

+    if (typeof (o[prop]) == "undefined") {
+      ASSetPropFlags (o, prop, 0, 5248);
+      if (typeof (o[prop]) != "undefined") {
+	set_info (info, prop, "newer", true);
+	// don't set the flags back
+      } else {
+	set_info (info, prop, "newer", false);
+      }
+    } else {
+      set_info (info, prop, "newer", false);
+    }
+  }
+
+  for (var i = 0; i < all.length; i++)
+  {
+    var prop = all[i];
+
     // try changing value
     var old = o[prop];
     var val = "hello " + o[prop];
@@ -276,6 +293,9 @@
     if (get_info (info, prop, "not6") == true) {
       flags += "6";
     }
+    if (get_info (info, prop, "newer") == true) {
+      flags += "n";
+    }
     if (flags != "")
       flags = " (" + flags + ")";

@@ -338,7 +358,14 @@
   ASSetPropFlags (o, nothidden, 0, 1);

   for (var i = 0; i < all.length; i++) {
-    var prop = all[i];
+    var newer = false;
+    var prop = all[i];
+
+    if (typeof (o[prop]) == "undefined") {
+      ASSetPropFlags (o, prop, 0, 5248);
+      if (typeof (o[prop]) != "undefined")
+	newer = true;
+    }

     if (typeof (o[prop]) == "object" || typeof (o[prop]) == "function") {
       if (hasOwnProperty (o[prop], "mySecretId")) {
@@ -348,15 +375,29 @@
 	  identifier + "." + prop;
       }
     }
+
+    if (newer == true)
+      ASSetPropFlags (o, prop, 5248);
   }

   for (var i = 0; i < all.length; i++) {
     var prop = all[i];

     if (prop != null) {
+      var newer = false;
+
+      if (typeof (o[prop]) == "undefined") {
+	ASSetPropFlags (o, prop, 0, 5248);
+	if (typeof (o[prop]) != "undefined")
+	  newer = true;
+      }
+
       if (typeof (o[prop]) == "object" || typeof (o[prop]) == "function")
 	generate_names (o[prop], prefix + (prefix != "" ? "." : "") +
 	    identifier, prop);
+
+      if (newer == true)
+	ASSetPropFlags (o, prop, 5248);
     }
   }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 14744
Author:   klin@adobe.com
Date:     2010-03-12T23:33:39.865284Z

Log Message:
-----------
Merge revision 14741 from 4.x to trunk.

Adding ILayoutDirectionElement to address issues with non-styled components such as embedded bitmaps. Also, addressed issues with changing layoutDirection at runtime.

-Added ILayoutDirectionElement.as with the layoutDirection property and invalidateLayoutDirection(). I took them out of IVisualElement.
-Moved the mirroring code from FlexBitmap to BitmapAsset as well as SpriteAsset. Also, implemented ILayoutDirectionElement in both.
-Addressed issues with layoutDirection changing at runtime by adding logic in UIComponent and Container to call invalidateLayoutDirection() on all of their ILayoutDirectionElement children.
-Updated various other components to use the new interface.
-Updated the dependency checker.

QE notes: No
Doc notes: No
Bugs: SDK-25656, SDK-25685, SDK-25726, SDK-25758 , SDK-25776 , SDK-25784 , SDK-25791, SDK-25806
Reviewer: Jason, Carol
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SpriteAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexBitmap.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/BitmapAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutDirection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/4.x/frameworks/projects/framework/src/mx/core/ILayoutDirectionElement.as" copyfrom-rev="14741" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutDirectionElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -21,7 +21,6 @@
 import flash.events.Event;
 import flash.events.EventDispatcher;
 import flash.events.IEventDispatcher;
-import flash.filters.ShaderFilter;
 import flash.geom.ColorTransform;
 import flash.geom.Matrix;
 import flash.geom.Matrix3D;
@@ -33,10 +32,12 @@
 import mx.core.AdvancedLayoutFeatures;
 import mx.core.DesignLayer;
 import mx.core.IInvalidating;
+import mx.core.ILayoutDirectionElement;
 import mx.core.ILayoutElement;
 import mx.core.IMXMLObject;
 import mx.core.IUIComponent;
 import mx.core.IVisualElement;
+import mx.core.LayoutDirection;
 import mx.core.UIComponent;
 import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
@@ -51,7 +52,6 @@
 import mx.graphics.shaderClasses.ColorShader;
 import mx.graphics.shaderClasses.ExclusionShader;
 import mx.graphics.shaderClasses.HueShader;
-import mx.graphics.shaderClasses.LuminosityMaskShader;
 import mx.graphics.shaderClasses.LuminosityShader;
 import mx.graphics.shaderClasses.SaturationShader;
 import mx.graphics.shaderClasses.SoftLightShader;
@@ -2865,8 +2865,8 @@
         if (_layoutDirection != null)
             return _layoutDirection;

-        const parentElt:IVisualElement = parent as IVisualElement;
-        return (parentElt) ? parentElt.layoutDirection : "ltr";
+        const parentElt:ILayoutDirectionElement = parent as ILayoutDirectionElement;
+        return (parentElt) ? parentElt.layoutDirection : LayoutDirection.LTR;
     }

 	/**
@@ -2886,7 +2886,7 @@
      */
     public function invalidateLayoutDirection():void
     {
-        const parentElt:IVisualElement = parent as IVisualElement;
+        const parentElt:ILayoutDirectionElement = parent as ILayoutDirectionElement;
         if (!parentElt)
             return;


Transferred from the Adobe Open Source Subversion Repository

Revision: 16711
Author:   chiedozi@adobe.com
Date:     2010-06-29T00:59:56.370003Z

Log Message:
-----------
Removed replaceCurrentView from ViewNavigator

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorSection.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@1264405 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as
@@ -236,17 +236,6 @@
             _source.length = 1;
     }

-    /**
-     *  Replaces the top item of the stack.
-     */
-    public function replaceTop(data:ViewData):void
-    {
-        if (_source.length == 0)
-            _source.push(data)
-        else
-            _source[_source.length - 1] = data;
-    }
-
     //--------------------------------------------------------------------------
     //
     // Methods: IExternalizable


Transferred from the Adobe Open Source Subversion Repository

Revision: 22784
Author:   jasonsj@adobe.com
Date:     2011-09-28T19:33:36.837503Z

Log Message:
-----------
ASDoc update to indicate pop-up owners can not be a descendant. Remove FIXME.

QE notes:
Doc notes:
Bugs:
SDK-31429 RTE and eventual app crashes when the owner of the callout is set to the first view navigator or its children
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as
@@ -368,7 +368,8 @@
      *  FlexEvent.OPEN event.
      *
      *  @param owner The owner of the container.
-     *  The popup appears over this container.
+     *  The popup appears over this component. The owner must not be descendant
+     *  of this container.
      *
      *  @param modal Whether the container should be modal.
      *  A modal container takes all keyboard and mouse input until it is closed.
@@ -404,11 +405,6 @@
             updatePopUpPosition();
         }

-        // FIXME (jasonsj): SDK-31429
-        // Abort if PopUpManager was not able to add the pop-up
-//        if (!this.isPopUp)
-//            return;
-
         // Change state *after* we pop up, as the skin needs to go be in the initial "closed"
         // state while being created above in order for transitions to detect state change and play.
         _isOpen = true;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19645
Author:   smgilson@adobe.com
Date:     2011-01-07T16:39:27.887514Z

Log Message:
-----------
ASDOc pass on SkinnablePopUpContainer.as and PopUpEvent.as

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

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

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

--- frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as
@@ -29,8 +29,9 @@
 /**
  *  Dispatched by the container when it's opened and ready for user interaction.
  *
- *  This event is dispatched when the container switches from "closed" to "normal"
- *  state and the transition to that state completes.
+ *
This event is dispatched when the container switches from the
+ *  closed to normal skin state and the transition
+ *  to that state completes.

  *
  *  @eventType spark.events.PopUpEvent.OPEN
  *
@@ -44,17 +45,22 @@
 /**
  *  Dispatched by the container when it's closed.
  *
- *  This event is dispatched when the container switches from "normal" to "closed"
- *  state and the transition to that state completes.
- *
- *
The event provides a mechanism to pass commit information from the container to
- *  a listener.  One typical usage scenario is building a multiple-choice dialog with a
- *  cancel button.  When a valid option is selected, the developer closes the dialog
- *  with a call to the SkinnablePopUpContainer.close() method, passing
+ *
This event is dispatched when the container switches from the
+ *  normal to closed skin state and
+ *  the transition to that state completes.

+ *
+ *
The event provides a mechanism to pass commit information from
+ *  the container to an event listener.
+ *  One typical usage scenario is building a multiple-choice dialog with a
+ *  cancel button.
+ *  When a valid option is selected, you close the pop up
+ *  with a call to the close() method, passing
  *  true to the commit parameter and optionally passing in
- *  any relevant data.  When the SkinnablePopUpContainer has completed closing,
- *  it will dispatch this event.  Then, in the listener, the developer can check
- *  the commit parameter and perform the appropriate action.

+ *  any relevant data.
+ *  When the SkinnablePopUpContainer has completed closing,
+ *  it dispatches this event.
+ *  Then, in the event listener, you can check the commit
+ *  property and perform the appropriate action.

  *
  *  @eventType spark.events.PopUpEvent.CLOSE
  *
@@ -70,7 +76,7 @@
 //--------------------------------------

 /**
- *  Closed State
+ *  The closed state.
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -80,20 +86,50 @@
 [SkinState("closed")]

 /**
- *  The SkinnablePopUpContainer class is a SkinnableContainer that also acts as a pop-up.
- *
- *  The SkinnablePopUpContainer is initially in its "closed" state and when it's opened
- *  it will add itself as a pop-up to the PopUpManager and transition to its "normal" state.
- *
- *
When using SkinnablePopUpContainer the pop-up is defined in mxml as
- *  a SkinnablePopUpContainer component.  To show the component create an instance and
- *  call the open() method. The developers are responsible for the sizing and positioning
- *  of the component.  To close the component call the close()
- *  method.  If the pop-up needs to pass data back to a handler, you can add a listener for
- *  the PopUp.CLOSE event and specify the data in the close() method.

- *
- *  To define open and close animations, use a custom skin with transitions between the "closed"
- *  and "normal" states.
+ *  The SkinnablePopUpContainer class is a SkinnableContainer that functions as a pop-up.
+ *  One typical use for a SkinnablePopUpContainer container is to open a simple window
+ *  in an application, such as an alert window, to indicate that the user must perform some action.
+ *
+ *
You do not create a SkinnablePopUpContainer container as part of the normal layout
+ *  of its parent container.
+ *  Instead, it appears as a pop-up window on top of its parent.
+ *  Therefore, you do not create it directly in the MXML code of your application.

+ *
+ *
Instead, you create is as an MXML component, often in a separate MXML file.
+ *  To show the component create an instance of the MXML component, and
+ *  then call the open() method.
+ *  You can also set the size and position of the component when you open it.

+ *
+ *
To close the component, call the close() method.
+ *  If the pop-up needs to return data to a handler, you can add an event listener for
+ *  the PopUp.CLOSE event, and specify the returned data in
+ *  the close() method.

+ *
+ *
The SkinnablePopUpContainer is initially in its closed skin state.
+ *  When it opens, it adds itself as a pop-up to the PopUpManager,
+ *  and transition to the normal skin state.
+ *  To define open and close animations, use a custom skin with transitions between
+ *  the closed and normal skin states.

+ *
+ *
The SkinnablePopUpContainer container has the following default characteristics:

+ *

+ *
Characteristic	Description

+ *
Default size	Large enough to display its children

+ *
Minimum size	0 pixels

+ *
Maximum size	10000 pixels wide and 10000 pixels high

+ *
Default skin class	spark.skins.spark.SkinnablePopUpContainerSkin

+ *

+ *
+ *  @mxml
The <s:SkinnablePopUpContainer> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <s:SkinnablePopUpContainer
+ *    Events
+ *    close="No default"
+ *    open="No default"
+ *  />
+ *

  *
  *  @see spark.skins.spark.SkinnablePopUpContainerSkin
  *
@@ -164,7 +200,7 @@
     [Inspectable(category="General", defaultValue="false")]

     /**
-     *  True when the container is open and is currently showing as a pop-up.
+     *  Contains true when the container is open and is currently showing as a pop-up.
      *
      *  @see #open
      *  @see #close
@@ -199,12 +235,17 @@
     //--------------------------------------------------------------------------

     /**
-     *  Brings up the container as a pop-up and switches the state from "closed" to "normal",
-     *  waits till any state transitions are finished playing and dispatches FlexEvent.OPEN event.
-     *
-     *  @param owner The owner of the container.
+     *  Opens the container as a pop-up, and switches the skin state from
+     *  closed to normal.
+     *  After and transitions finish playing, it dispatches  the
+     *  FlexEvent.OPEN event.
+     *
+     *  @param owner The owner of the container.
+     *  The popup appears over this container.
      *
      *  @param modal Whether the container should be modal.
+     *  A modal container takes all keyboard and mouse input until it is closed.
+     *  A nonmodal container allows other components to accept input while the pop-up window is open.
      *
      *  @see #close
      *
@@ -245,20 +286,29 @@
     }

     /**
-     *  Changes the current state to "closed", waits till any state transitions are finished playing,
-     *  dispatches a PopUpEvent.CLOSE event and removes the container from the PopUpManager.
-     *
-     *
The PopUpEvent provides a mechanism to pass commit information from the container to
-     *  a listener.  One typical usage scenario is building a multiple-choice dialog with a
-     *  cancel button.  When a valid option is selected, the developer closes the dialog
-     *  with a call to the SkinnablePopUpContainer.close() method, passing
-     *  true to the commit parameter and optionally passing in
-     *  any relevant data.  When the SkinnablePopUpContainer has completed closing,
-     *  it will dispatch this event.  Then, in the listener, the developer can check
+     *  Changes the current skin state to closed, waits until any state transitions
+     *  finish playing, dispatches a PopUpEvent.CLOSE event,
+     *  and then removes the container from the PopUpManager.
+     *
+     *
Use the close() method of the SkinnablePopUpContainer container
+     *  to pass data back to the main application from the pop up.
+     *  One typical usage scenario is building a dialog with a cancel button.
+     *  When a valid option is selected in the dialog box, you close the dialog
+     *  with a call to the close() method, passing
+     *  true to the commit parameter and optionally passing
+     *  any relevant data.
+     *  When the SkinnablePopUpContainer has completed closing,
+     *  it dispatch the close event.
+     *  In the event listener for the close event, you can check
      *  the commit parameter and perform the appropriate actions.

      *
-     *  @param commit The value for the commit property of the PopUpEvent event.
-     *  @param data The value for the data property for the PopUpEvent event.
+     *  @param commit Specifies if the return data should be committed by the application.
+     *  The value of this argument is written to the commit property of
+     *  the PopUpEvent event object.
+     *
+     *  @param data Specifies any data returned to the application.
+     *  The value of this argument is written to the data property of
+     *  the PopUpEvent event object.
      *
      *  @see #open
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 12057
Author:   aharui@adobe.com
Date:     2009-11-20T19:22:05.684900Z

Log Message:
-----------
Label (and RichText) will show text as tooltip if truncated and new showTruncationTip flag is set to true (defaults to false because Label is often used in skin that have their own tooltip logic).

QE Notes: New API (showTruncationTip)
Doc Notes: New API (showTruncationTip)
Bugs: SDK-23639
Reviewer: Gordon
API Change: Yes
Is noteworthy for integration: Yes
tests: checkintests mustella/gumbo/components/Button mustella/gumbo/components/Label

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -339,6 +339,8 @@
         if (_isTruncated != value)
         {
             _isTruncated = value;
+            if (showTruncationTip)
+                toolTip = _isTruncated ? text : null;
             dispatchEvent(new Event("isTruncatedChanged"));
         }
     }
@@ -409,6 +411,40 @@
     }

     //----------------------------------
+	//  showTruncationTip
+    //----------------------------------
+
+    /**
+     *  @private
+	 *  Storage for the showTruncationTip property.
+     */
+    private var _showTruncationTip:Boolean = false;
+
+    /**
+	 *  A property that controls whether the component
+     *  should show a toolTip when the text has been truncated.
+	 *
+	 *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+	public function get showTruncationTip():Boolean
+    {
+		return _showTruncationTip;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showTruncationTip(value:Boolean):void
+    {
+		_showTruncationTip = value;
+    }
+
+    //----------------------------------
     //  text
     //----------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 7665
Author:   gosmith@adobe.com
Date:     2009-06-09T03:56:17.304530Z

Log Message:
-----------
Add null checks so that TextGraphicElement doesn't execute measure() or updateDisplayList() without a drawnDisplayObject.

QE Notes: None
Doc Notes: None
Bugs: SDK-21420 [GUMBO_PRIORITY]
Reviewer: Evtim to review

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -646,9 +646,9 @@
     override protected function measure():void
     {
         // The measure() method of a GraphicElement can get called
-        // when its style chain hasn't been initialized.
-        // In that case, composeTextLines() must not be called.
-        if (!styleChainInitialized)
+        // when its style chain hasn't been initialized
+        // or when no DisplayObject has been assigned to it.
+        if (!styleChainInitialized || !drawnDisplayObject)
             return;

         // _widthConstraint trumps even explicitWidth as some layouts may choose
@@ -763,9 +763,9 @@
         super.updateDisplayList(unscaledWidth, unscaledHeight);

         // The updateDisplayList() method of a GraphicElement can get called
-        // when its style chain hasn't been initialized.
-        // In that case, composeTextLines() must not be called.
-        if (!styleChainInitialized)
+        // when its style chain hasn't been initialized
+        // or when no DisplayObject has been assigned to it.
+        if (!styleChainInitialized || !drawnDisplayObject)
             return;

         // Figure out if a compose is needed or maybe just clip what is already


Implimentation of DBService over remote mysql connection

Now uses Database Service to maintain key archive vs using a remote
mysql server.

--- src/sfxworks/Communications.as
+++ src/sfxworks/Communications.as
@@ -5,8 +5,11 @@
 	import com.maclema.mysql.MySqlToken;
 	import com.maclema.mysql.ResultSet;
 	import com.maclema.mysql.Statement;
+	import flash.data.SQLResult;
+	import flash.data.SQLStatement;
 	import flash.desktop.NativeApplication;
 	import flash.errors.IOError;
+	import flash.errors.SQLError;
 	import flash.events.Event;
 	import flash.events.EventDispatcher;
 	import flash.events.IOErrorEvent;
@@ -26,6 +29,7 @@
 	import flash.utils.ByteArray;
 	import flash.utils.Timer;
 	import sfxworks.services.DatabaseService;
+	import sfxworks.services.events.DatabaseServiceEvent;

 	import sfxworks.NetworkActionEvent;
 	import sfxworks.NetworkEvent;
@@ -40,6 +44,7 @@
 		private var mysqlConnection:Connection;

 		private var _databaseService:DatabaseService;
+		private static const PUBLIC_KEY_DATABASE:String = "COMMUNICATIONS-PKDB";

 		//MyIdentity
 		private var _name:String;
@@ -70,14 +75,6 @@

 		//PublicKey and data management
 		//||
-		private static const PUBLIC_DATA_STORAGE:String = "CORE-COMMUNICATIONS-PUBLICDB";
-		private var publicDataI:NetStream; //Inbound
-		private var publicDataO:NetStream; //Outbound
-		private var pdsGspec:GroupSpecifier;
-
-		private var publicDataIConnected:Boolean = false;
-		private var publicDataOConnected:Boolean = false;
-

 		public function Communications()
 		{
@@ -292,34 +289,45 @@
 			getGroup(groupName).sendToAllNeighbors(object);
 		}

-
-		//    v
 		private function p2pdb():void
 		{
 			_databaseService = new DatabaseService(this);
-			_databaseService.connectToDatabase("CORE-COMMUNICATIONS-PUBLICDB");
-			_databaseService
-
-			var gspec:GroupSpecifier = new GroupSpecifier("CORE-COMMUNICATIONS-PUBLICDB");
-			gspec.objectReplicationEnabled = true;
-			gspec.serverChannelEnabled = true;
-			gspec.multicastEnabled = true;
-
-			this.addGroup("CORE-COMMUNICATIONS-PUBLICDB", gspec);
-			addEventListener(NetworkGroupEvent.CONNECTION_SUCCESSFUL, handleSuccessfulGroupConnection);
-		}
-		//   ^
-
-
-		private function handleMysqlConnection(e:Event):void
-		{
-			trace("COMMUNICATIONS: Connected.");
-			mysqlConnection.removeEventListener(Event.CONNECT, handleMysqlConnection);
+			_databaseService.connectToDatabase(PUBLIC_KEY_DATABASE);
+			_databaseService.addEventListener(DatabaseServiceEvent.CONNECTED, handleDatabaseConnection);
+		}
+
+		private function handleDatabaseConnection(e:DatabaseServiceEvent):void
+		{
+			trace("COMMUNICATIONS: Connected to p2p db.");
+			_databaseService.removeEventListener(DatabaseServiceEvent.CONNECTED);
+
+			//TODO: Remove some sort of sql schedule that removes create if not exists functions
+			var statement:SQLStatement = new SQLStatement();
+
+			var sql:String = "CREATE TABLE IF NOT EXISTS users (" +
+			"    name TEXT, " +
+			"    nearid TEXT, " +
+			"    publickey BLOB" +
+			");";
+			statement.text = sql;
+
+			var initResult = _databaseService.writeToDB(PUBLIC_KEY_DATABASE, statement);
+			if (initResult is SQLResult)
+			{
+				("Successfully created table if it didn't exist");
+			}
+			else if (initResult is SQLError)
+			{
+				trace("Some kind of horrible, horrible error.");
+				dispatchEvent(new NetworkActionEvent(NetworkActionEvent.ERROR, initResult));
+				return;
+			}

 			var f:File = new File();
 			f = File.applicationStorageDirectory.resolvePath(".s3key");
+
 			var fs:FileStream = new FileStream();
-			var st:Statement = mysqlConnection.createStatement();
+			var st:SQLStatement = new SQLStatement();
 			trace("COMMUNICATIONS: Checking key.");
 			if (f.exists) //Update
 			{
@@ -329,10 +337,10 @@
 				fs.readBytes(_publicKey, 0, 24); //Read public key into identity
 				fs.close();

-				st.sql = "UPDATE users "
-				+ "SET `nearid`='"+_netConnection.nearID+"' "
-				+ "WHERE `key`=?;";
-				st.setBinary(1, _privateKey);
+				st.text = "UPDATE users "
+				+ "SET nearid="+_netConnection.nearID+" "
+				+ "WHERE key=@publicKey;";
+				st.parameters["@publicKey"] = _publicKey;
 			}
 			else //Register
 			{
@@ -346,17 +354,25 @@
 				fs.writeBytes(_publicKey);
 				fs.close();

-				st.sql = "INSERT INTO users (`name`, `nearid`, `key`, `publickey`)"
-					+ " VALUES ('"+File.userDirectory.name+"','"+_netConnection.nearID+"',?,?);";
-				st.setBinary(1, _privateKey);
-				st.setBinary(2, _publicKey);
+				st.sql = "INSERT INTO users (name, nearid, publickey)"
+					+ " VALUES ('"+File.userDirectory.name+"','"+_netConnection.nearID+"',@publicKey);";
+				st.parameters["@publicKey"] = _publicKey;
 			}

 			trace("COMMUNICATIONS: Sending query to server..");
-			var t:MySqlToken = st.executeQuery();
-			t.addResponder(new AsyncResponder(mysqlNearIDUpdateSuccess, mysqlNearIDUpdateError, t));
-
-			timerRefresh = new Timer(40000);
+
+			var result = _databaseService.writeToDB(PUBLIC_KEY_DATABASE, st);
+			if (result is SQLResult)
+			{
+				dispatchEvent(new NetworkEvent(NetworkEvent.CONNECTED, _netConnection.nearID));
+			}
+			else if (result is SQLError)
+			{
+				dispatchEvent(new NetworkEvent(NetworkEvent.ERROR, null));
+				trace("COMMUNICATIONS: Update error." + result);
+			}
+
+			timerRefresh = new Timer(20000);
 			timerRefresh.addEventListener(TimerEvent.TIMER, networkTimerRefresh);
 			timerRefresh.start();
 		}
@@ -398,17 +414,6 @@
 			}
 		}

-		private function mysqlNearIDUpdateError(info:Object, token:MySqlToken):void
-		{
-			dispatchEvent(new NetworkEvent(NetworkEvent.ERROR, null));
-			trace("COMMUNICATIONS: Update error.");
-		}
-
-		private function mysqlNearIDUpdateSuccess(data:Object, token:MySqlToken):void
-		{
-			trace("COMMUNICATIONS: Update success.");
-			dispatchEvent(new NetworkEvent(NetworkEvent.CONNECTED, _netConnection.nearID));
-		}

 		public function get privateKey():ByteArray
 		{
@@ -449,28 +454,27 @@
 		public function nameChange(name:String):void
 		{
 			nameChangeRequest = name;
-			var st:Statement = mysqlConnection.createStatement();
-			st.sql = "UPDATE users "
-				+ "SET `name`='"+name+"' "
-				+ "WHERE `key`=?;";
-			st.setBinary(1, _privateKey);
-
-			var t:MySqlToken = st.executeQuery();
-			t.addResponder(new AsyncResponder(nameChangeResponderSuccess, nameChangeResponderError, t));
+			var st:SQLStatement = new SQLStatement();
+			st.text = "UPDATE users "
+				+ "SET name='"+name+"' "
+				+ "WHERE publickey=@publickey;";
+			st.parameters["@publickey"] = _publicKey;
+
 			trace("COMMUNICATIONS: Name change triggered.");
-		}
-
-		private function nameChangeResponderSuccess(data:Object, token:MySqlToken):void
-		{
-			trace("COMMUNICATIONS: Name change response success..");
-			_name = nameChangeRequest;
-			dispatchEvent(new NetworkActionEvent(NetworkActionEvent.SUCCESS, data));
-		}
-
-		private function nameChangeResponderError(info:Object, token:MySqlToken):void
-		{
-			trace("COMMUNICATIONS: Name change response error:" + info);
-			dispatchEvent(new NetworkActionEvent(NetworkActionEvent.ERROR, info));
+			var result = _databaseService.writeToDB(PUBLIC_KEY_DATABASE, st);
+
+
+			if (result is SQLResult)
+			{
+				trace("COMMUNICATIONS: Name change response success..");
+				_name = nameChangeRequest;
+				dispatchEvent(new NetworkActionEvent(NetworkActionEvent.SUCCESS, result));
+			}
+			else if (result is SQLError)
+			{
+				trace("COMMUNICATIONS: Name change response error:" + result);
+				dispatchEvent(new NetworkActionEvent(NetworkActionEvent.ERROR, result));
+			}
 		}