updating xmpp connection

updating xmpp connection

--- src/org/jivesoftware/xiff/core/XMPPConnection.as
+++ src/org/jivesoftware/xiff/core/XMPPConnection.as
@@ -32,7 +32,6 @@
 	import flash.xml.XMLDocument;
 	import flash.xml.XMLNode;

-	import mx.controls.Alert;
 	import mx.utils.StringUtil;

 	import org.jivesoftware.xiff.data.IExtension;
@@ -130,7 +129,7 @@
 		/**
 		 * @private
 		 */
-		protected var socket:XMLSocket;
+		protected var _socket:XMLSocket;

 		/**
 		 * @private
@@ -199,13 +198,6 @@

 		public function XMPPConnection()
 		{
-			// Create the socket
-			socket = new XMLSocket();
-			socket.addEventListener(Event.CONNECT,socketConnected);
-			socket.addEventListener(IOErrorEvent.IO_ERROR,onIOError);
-			socket.addEventListener(Event.CLOSE,socketClosed);
-			socket.addEventListener(DataEvent.DATA,socketReceivedData);
-			socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityError);

 			// Hash to hold callbacks for IQs
 			pendingIQs = new Object();
@@ -233,6 +225,10 @@
 		 */
 		public function connect( streamType:String = "terminatedStandard" ):Boolean
 		{
+
+			// Create the socket
+			_socket = _createXmlSocket();
+
 			active = false;
 			loggedIn = false;

@@ -260,7 +256,7 @@
 					closingStreamTag = new String( "</stream:stream>" );
 					break;
 			}
-			socket.connect( server, port );
+			_socket.connect( server, port );
 			return true;
 		}

@@ -272,7 +268,7 @@
 		{
 			if( isActive() ) {
 				sendXML( closingStreamTag );
-				socket.close();
+				_socket.close();
 				active = false;
 				loggedIn = false;
 				var event:DisconnectionEvent = new DisconnectionEvent();
@@ -294,7 +290,7 @@
 			if( isActive() ) {
 				if( o is IQ ) {
 	                var iq:IQ = o as IQ;
-	                if (iq.callbackName != null && iq.callbackScope != null)
+	                if ((iq.callbackName != null && iq.callbackScope != null) || iq.callback != null)
 	                {
 	                	addIQCallbackToPending( iq.id, iq.callbackName, iq.callbackScope, iq.callback );
 	                }
@@ -594,7 +590,7 @@

 			// Cancel everything by closing connection
 			try {
-				socket.close();
+				_socket.close();
 			}
 			catch (error:Error){

@@ -620,7 +616,7 @@

 			// If it's an error, handle it

-			if( iq.type == IQ.ERROR_TYPE ) {
+			if( iq.type == IQ.ERROR_TYPE && !pendingIQs[iq.id]) {
 				dispatchError( iq.errorCondition, iq.errorMessage, iq.errorType, iq.errorCode );
 			}
 			else {
@@ -629,7 +625,9 @@
 				if( pendingIQs[iq.id] !== undefined ) {
 					var callbackInfo:* = pendingIQs[iq.id];

-					callbackInfo.methodScope[callbackInfo.methodName].apply( callbackInfo.methodScope, [iq] );
+					if(callbackInfo.methodScope && callbackInfo.methodName) {
+						callbackInfo.methodScope[callbackInfo.methodName].apply( callbackInfo.methodScope, [iq] );
+					}
 					if (callbackInfo.func != null) {
 						callbackInfo.func( iq );
 					}
@@ -710,7 +708,6 @@
 		 * @private
 		 */
 		protected function securityError(event:SecurityErrorEvent):void{
-			Alert.show("there was a security error of type: " + event.type + "\nError: " + event.text);
 			trace("there was a security error of type: " + event.type + "\nError: " + event.text);
 			dispatchError( "not-authorized", "Not Authorized", "auth", 401 );
 		}
@@ -737,7 +734,7 @@
 				trace(someData);
 			}
 			// Data is untyped because it could be a string or XML
-			socket.send( someData );
+			_socket.send( someData );
 			var event:OutgoingDataEvent = new OutgoingDataEvent();
 			event.data = someData;
 			dispatchEvent( event );
@@ -949,5 +946,15 @@
 		{
 			ignoreWhitespace = val;
 		}
+
+		private function _createXmlSocket():XMLSocket {
+			var socket:XMLSocket = new XMLSocket(server, port);
+			socket.addEventListener(Event.CONNECT,socketConnected);
+			socket.addEventListener(IOErrorEvent.IO_ERROR,onIOError);
+			socket.addEventListener(Event.CLOSE,socketClosed);
+			socket.addEventListener(DataEvent.DATA,socketReceivedData);
+			socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityError);
+			return socket;
+		}
 	}
 }


changed formSet to support canceling FORM_WILL_CHANGE

This change enables the implementation of additional checks before the active form is really changed.

Additionally, formset will only dispatch FORM_WILL_CHANGE and FORM_CHANGE if the change is directly caused by user-interaction with the contained forms, not if it is caused by invoking FormSet#setActiveFormIndex

--- src/reprise/controls/html/FormSet.as
+++ src/reprise/controls/html/FormSet.as
@@ -78,33 +78,7 @@

 		public function setActiveFormIndex(index:int):void
 		{
-			index = Math.max(Math.min(index, m_forms.length - 1), 0);
-
-			if (index == m_activeFormIndex)
-			{
-				return;
-			}
-			if (m_activeFormIndex != -1)
-			{
-				Form(m_forms[m_activeFormIndex]).deactivate();
-			}
-			var oldIndex:int = m_activeFormIndex;
-			var newIndex:int = index;
-			Form(m_forms[index]).activate();
-			var event:FormEvent;
-			if (m_activeFormIndex != -1)
-			{
-				event = new FormEvent(FormEvent.FORM_WILL_CHANGE);
-				event.oldIndex = oldIndex;
-				event.newIndex = newIndex;
-				dispatchEvent(event);
-			}
-			m_activeFormIndex = index;
-			event = new FormEvent(FormEvent.FORM_CHANGE);
-			event.oldIndex = oldIndex;
-			event.newIndex = newIndex;
-			invalidate();
-			dispatchEvent(event);
+			applyFormIndex(index, false);
 		}

 		public function setValidationDisabled(bFlag:Boolean):void
@@ -138,12 +112,53 @@
 				{
 					if (m_forms.length)
 					{
-						setActiveFormIndex(0);
+						applyFormIndex(0, false);
 					}
 					return;
 				}
 			}
-			setActiveFormIndex(m_activeFormIndex);
+			applyFormIndex(m_activeFormIndex, false);
+		}
+
+		protected function applyFormIndex(index:int, dispatchEvents : Boolean) : void
+		{
+			index = Math.max(Math.min(index, m_forms.length - 1), 0);
+			if (index == m_activeFormIndex)
+			{
+				return;
+			}
+
+			var oldIndex:int = m_activeFormIndex;
+			var newIndex:int = index;
+
+			var event:FormEvent;
+			if (dispatchEvents && m_activeFormIndex != -1)
+			{
+				event = new FormEvent(FormEvent.FORM_WILL_CHANGE, false, true);
+				event.oldIndex = oldIndex;
+				event.newIndex = newIndex;
+				dispatchEvent(event);
+				if (event.isDefaultPrevented())
+				{
+					return;
+				}
+			}
+
+			if (m_activeFormIndex != -1)
+			{
+				Form(m_forms[m_activeFormIndex]).deactivate();
+			}
+			Form(m_forms[index]).activate();
+			m_activeFormIndex = index;
+			invalidate();
+
+			event = new FormEvent(FormEvent.FORM_CHANGE);
+			event.oldIndex = oldIndex;
+			event.newIndex = newIndex;
+			if (dispatchEvents)
+			{
+				dispatchEvent(event);
+			}
 		}

 		protected function addForm(form : Form) : void
@@ -156,7 +171,7 @@
 			{
 				if (m_activeFormIndex == -1 || m_activeFormIndex == m_forms.length - 1)
 				{
-					setActiveFormIndex(m_forms.length - 1);
+					applyFormIndex(m_forms.length - 1, false);
 				}
 			}
 		}
@@ -193,13 +208,13 @@
 			}
 			else
 			{
-				setActiveFormIndex(m_activeFormIndex + 1);
+				applyFormIndex(m_activeFormIndex + 1, true);
 			}
 		}

 		protected function form_back(e:FormEvent):void
 		{
-			setActiveFormIndex(m_activeFormIndex - 1);
+			applyFormIndex(m_activeFormIndex - 1, true);
 		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/automation_spark/src/spark/automation/codec/SparkDropDownListBaseSelectedItemCodec.as
+++ frameworks/projects/automation_spark/src/spark/automation/codec/SparkDropDownListBaseSelectedItemCodec.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Solved issue with viewport size in flash viewer.

--- tools/viewers/flash/src/AWDViewer.as
+++ tools/viewers/flash/src/AWDViewer.as
@@ -26,12 +26,17 @@
 	import away3d.materials.DefaultMaterialBase;
 	import away3d.materials.TextureMaterial;
 	import away3d.materials.lightpickers.StaticLightPicker;
+	import away3d.textures.BitmapTexture;
+	import away3d.textures.BitmapTextureCache;
+	import away3d.tools.utils.TextureUtils;

+	import flash.display.BitmapData;
 	import flash.display.Sprite;
 	import flash.display.StageAlign;
 	import flash.display.StageScaleMode;
 	import flash.events.Event;
 	import flash.events.MouseEvent;
+	import flash.geom.Matrix;
 	import flash.geom.Vector3D;
 	import flash.net.URLRequest;

@@ -58,6 +63,9 @@
 		{
 			init();
 			load(loaderInfo.parameters['awd'] || 'default.awd');
+
+			// Force resize
+			stage.dispatchEvent(new Event(Event.RESIZE));
 		}

@@ -179,6 +187,9 @@
 			_loader.scale(scale);

 			_view.scene.addChild(_loader);
+
+			// Force resize
+			stage.dispatchEvent(new Event(Event.RESIZE));
 		}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8022
Author:   gruehle@adobe.com
Date:     2009-06-19T23:32:15.550715Z

Log Message:
-----------
Remove [ExcludeClass] metadata.

Bugs: SDK-21924
QE Notes: None
Doc Notes: None
Reviewer: Steve

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/FlashComponentPlaceholder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/FlashContainerPlaceholder.as</path>

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

--- frameworks/projects/authoringsupport/src/FlashComponentPlaceholder.as
+++ frameworks/projects/authoringsupport/src/FlashComponentPlaceholder.as
@@ -12,8 +12,6 @@
 package
 {
 import mx.controls.Image;
-
-[ExcludeClass]

 [IconFile("flash_component_icon_small.png")]
 public class FlashComponentPlaceholder extends FlashContainerPlaceholder


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/advancedgrids/src/mx/controls/olapDataGridClasses/OLAPDataGridHeaderRendererProvider.as
+++ frameworks/projects/advancedgrids/src/mx/controls/olapDataGridClasses/OLAPDataGridHeaderRendererProvider.as
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls.olapDataGridClasses
+{
+
+/**
+ *  The OLAPDataGridHeaderRendererProvider class lets you specify a
+ *  custom header renderer for the columns in the OLAPDataGrid control.
+ *
+ *
To specify a custom header renderer to the OLAPDataGrid control,
+ *  create your customer header renderer as a subclass of the OLAPDataGridHeaderRenderer class,
+ *  create an instance of the OLAPDataGridHeaderRendererProvider,
+ *  set the OLAPDataGridHeaderRendererProvider.renderer property to
+ *  your customer header renderer, and
+ *  then pass the OLAPDataGridHeaderRendererProvider instance to the OLAPDATAGrid control
+ *  by setting the OLAPDataGrid.headerRendererProviders property.

+ *
+ *  @see mx.controls.OLAPDataGrid
+ *  @see mx.controls.olapDataGridClasses.OLAPDataGridHeaderRenderer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class OLAPDataGridHeaderRendererProvider extends OLAPDataGridRendererProvider
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // headerWordWrap
+    //----------------------------------
+
+    /**
+     *  Set to true to wrap the text in the column header.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var headerWordWrap:*
+}
+}


ReactionView helper madness

ReactionView helper madness

--- vendor/ras3r/ras3r/ReactionView.as
+++ vendor/ras3r/ras3r/ReactionView.as
@@ -54,6 +54,37 @@

 		// >>> PROTECTED METHODS
 		// >>> HELPERS
+		// box layout helper:
+		protected function box (options:Object, ...args) :DisplayObjectContainer
+		{
+			options = new Hash({ direction: 'horizontal', padding: 4 }).update(options);
+
+			var direction:String = options.remove('direction');
+			var padding:uint = options.remove('padding');
+
+			var axis_property:String = (direction == 'horizontal' ? 'x' : 'y');
+			var size_property:String = (direction == 'horizontal' ? 'width' : 'height');
+
+			// create container for positional grouping
+			var container:Sprite = new Sprite();
+			addChild(container);
+
+			var previous:*;
+			while (previous = args.shift())
+			{
+				if (options.width) previous.width = options.width;
+
+				container.addChild(previous);
+
+				if (args.length)
+				{
+					args[0][axis_property] = previous[axis_property] + previous[size_property] + padding;
+				}
+			}
+
+			return container;
+		}
+
 		// label: String. Text label to display on button.
 		// attr: Hash. Optional. Properties to be applied to button upon creation (w, h, x, y, etc).
 		protected function button (label:String, attr:Object = null, styles:Object = null) :*
@@ -108,37 +139,8 @@
 		// horizontal layout helper:
 		protected function hbox (options:Object, ...args) :DisplayObjectContainer
 		{
-			options = new Hash({ padding: 4 }).update(options);
-
-			var container:Sprite = new Sprite();
-			addChild(container);
-
-			var previous:*;
-			while (previous = args.shift())
-			{
-				container.addChild(previous);
-				if (args.length) args[0].x = previous.x + previous.width + options.padding;
-			}
-
-			return container;
-		}
-
-		// vertical layout helper:
-		protected function vbox (options:Object, ...args) :DisplayObjectContainer
-		{
-			options = new Hash({ padding: 4 }).update(options);
-
-			var container:Sprite = new Sprite();
-			addChild(container);
-
-			var previous:*;
-			while (previous = args.shift())
-			{
-				container.addChild(previous);
-				if (args.length) args[0].y = previous.y + previous.height + options.padding;
-			}
-
-			return container;
+			args.unshift(options);
+			return box.apply(null, args);
 		}

 		protected function image (object_name:String, property:String, attributes:Object = null, styles:Object = null) :Image
@@ -150,12 +152,11 @@
 		{
 			// infer default instance id, but allow for manual override
 			attributes = new Hash({ id: (object_name + '_' + object_property) }).update(attributes);
-			// instantiation
-			var instance:* = sprite(name, attributes, styles);
-			// assignment
+			// assignment via attributes hash
 			try
 			{
-				instance[assign_property] = this[object_name][object_property];
+				attributes[assign_property] = this[object_name][object_property];
+				//instance[assign_property] = this[object_name][object_property];
 			}
 			catch (exception:*)
 			{
@@ -163,17 +164,20 @@
 				// to debug:
 				// Logger.info('ReactionView#instance_sprite exception: ' + exception);
 			}
+			// instantiation
+			var instance:* = sprite(name, attributes, styles);
 			// return
 			return instance;
 		}

-		protected function label (object_name:String, property:String, html:String, attributes:Object = null, styles:Object = null) :Label
+		protected function label (object_name:String, property:String, html:String, attributes:Object = null, styles:Object = null) :TextField
 		{
 			// infer default instance id, but allow for manual override
-			attributes = new Hash({ id: (object_name + '_' + property + '_label') }).update(attributes);
-			var label:Label = (instance_sprite(Label, 'htmlText', object_name, property, attributes, styles) as Label);
-			label.htmlText = html;
-			return label;
+			attributes = new Hash({
+				id: 		(object_name + '_' + property + '_label'),
+				htmlText:	html
+			}).update(attributes);
+			return (sprite(TextField, attributes, styles) as TextField);
 		}

 		// elem: Object. Visual element for whom the handler is being wired
@@ -245,6 +249,7 @@
 			{
 				sprite[p] = attr[p];
 			}
+
 			// assign styles
 			var ui:UIComponent = sprite as UIComponent;
 			if (ui)
@@ -254,15 +259,17 @@
 					ui.setStyle(s, styles[s]);
 				}
 			}
+
+			// TextField size sanity check
+			if (sprite.hasOwnProperty('textHeight') && sprite.textHeight) sprite.height = (sprite.textHeight + 4);
+
 			// add to display list
 			return addChild(sprite);
 		}

 		protected function text_field (object_name:String, property:String, attributes:Object = null, styles:Object = null) :TextField
 		{
-			var instance:* = (instance_sprite(TextField, 'htmlText', object_name, property, attributes, styles) as TextField);
-			instance.height = (instance.textHeight ? (instance.textHeight + 4) : 4);
-			return instance;
+			return (instance_sprite(TextField, 'htmlText', object_name, property, attributes, styles) as TextField);
 		}

 		protected function text_input (object_name:String, property:String, attributes:Object = null, styles:Object = null) :TextInput
@@ -291,6 +298,14 @@
 		protected function url_request_for (absolute_path:String, subdomain:String = null) :URLRequest
 		{
 			return ReactionController.url_request_for(absolute_path, subdomain);
+		}
+
+		// vertical layout helper:
+		protected function vbox (options:Object, ...args) :DisplayObjectContainer
+		{
+			options.direction = 'vertical';
+			args.unshift(options);
+			return box.apply(null, args);
 		}


Kilter VOD and live streams now playing pretty darn close to right.

--- HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
+++ HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
@@ -256,14 +256,27 @@
 			return -1;
 		}

-		public static function getSegmentContainingTime(segments:Vector.<HLSManifestSegment>, time:Number):HLSManifestSegment
-		{
-			// Find matches.
-			for(var i:int=0; i<segments.length; i++)
-			{
-				var seg:HLSManifestSegment = segments[i];
-				if(seg.startTime <= time && time < (seg.startTime + seg.duration))
-					return seg;
+		public static function getSegmentContainingTime(segments:Vector.<HLSManifestSegment>, time:Number, biasBackward:Boolean = false):HLSManifestSegment
+		{
+			if(biasBackward)
+			{
+				// Find matches.
+				for(var i:int=0; i<segments.length; i++)
+				{
+					var seg:HLSManifestSegment = segments[i];
+					if(seg.startTime <= time && time < (seg.startTime + seg.duration))
+						return seg;
+				}
+			}
+			else
+			{
+				// Find matches.
+				for(var i:int=0; i<segments.length; i++)
+				{
+					var seg:HLSManifestSegment = segments[i];
+					if(seg.startTime <= time && time <= (seg.startTime + seg.duration))
+						return seg;
+				}
 			}

 			// No match, dump to aid debug.
@@ -518,7 +531,7 @@

 			const fudgeTime:Number = 1.0;
 			var currentSeg:HLSManifestSegment = getSegmentBySequence(currentManifest.segments, currentSequence);
-			var newSeg:HLSManifestSegment = currentSeg ? getSegmentContainingTime(newManifest.segments, currentSeg.startTime + (end ? currentSeg.duration : 0)) : null;
+			var newSeg:HLSManifestSegment = currentSeg ? getSegmentContainingTime(newManifest.segments, currentSeg.startTime + (end ? currentSeg.duration : 0), !end) : null;
 			if(newSeg == null)
 			{
 				trace("Remapping from " + currentSequence);


Transferred from the Adobe Open Source Subversion Repository

Revision: 20558
Author:   egeorgie@adobe.com
Date:     2011-03-02T22:10:48.057790Z

Log Message:
-----------
Fix for http://bugs.adobe.com/jira/browse/SDK-29659 CrossFadeViewTransition incorrectly positions outgoing View

In this change:
- Whenever view transition is making use of snapshots:
  1. remember position of snapshots in global coordinates.
  2. after snapshot is added to the transitionGroup, update its local position so that its global position matches the remembered one.

QE notes: Generall pass of zoom, slide, flip and cross fade transitions
Doc notes:
Bugs: SDK-29659
Reviewer: Chiedo
Tests run: manual mustella cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as
@@ -13,6 +13,7 @@
 {

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

 import mx.core.mx_internal;
 import mx.effects.IEffect;
@@ -100,7 +101,7 @@

         var oldVisibility:Boolean = endView.visible;
         endView.visible = false;
-        cachedNavigator = getSnapshot(targetNavigator, 0);
+        cachedNavigator = getSnapshot(targetNavigator, 0, cachedNavigatorGlobalPosition);
         endView.visible = oldVisibility;
     }

@@ -124,9 +125,11 @@
         addComponentToContainer(transitionGroup, targetNavigator.skin);

         // Position our snapshot above endView.
+        transitionGroup.x = 0;
+        transitionGroup.y = 0;
+
         cachedNavigator.includeInLayout = false;
-        transitionGroup.addElement(cachedNavigator);
-        transitionGroup.x = transitionGroup.y = 0;
+        addCachedElementToGroup(transitionGroup, cachedNavigator, cachedNavigatorGlobalPosition);

         // Ensure that appropriate surfaces are cached and snapshots rendered.
         transitionGroup.validateNow();


Transferred from the Adobe Open Source Subversion Repository

Revision: 22006
Author:   jasonsj@adobe.com
Date:     2011-08-15T23:49:37.068379Z

Log Message:
-----------
SDK-31052 erase the CalloutSkin drop shadow when backgroundAlpha < 1
SDK-31028 New contentBackgroundAppearance style and CalloutContentBackgroundAppearance to remove content background shadow and/or color in Callout.

QE notes: ViewNavigatorCalloutSkin has been removed. Instead, set contentBackgroundAppearance=none on the Callout. It's no longer necessary to set contentBackgroundAlpha=1 on ViewNavigators inside a Callout.
Doc notes:
Bugs:
SDK-31052 Drop shadow appears beneath arrow when Callout has a backgroundAlpha less than 1
SDK-31028 Callout skinning/styling should account for arbitrary use of a ViewNavigator child
Reviewer: betravis
Tests run: checkintests, mustella-mobile
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorCalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutContentBackgroundAppearance.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as
@@ -0,0 +1,397 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2011 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.skins.mobile.supportClasses
+{
+import flash.display.BlendMode;
+import flash.display.DisplayObject;
+import flash.display.GradientType;
+import flash.display.Graphics;
+import flash.display.GraphicsPathCommand;
+import flash.display.Sprite;
+
+import mx.core.DPIClassification;
+import mx.core.FlexGlobals;
+import mx.core.IVisualElement;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.utils.ColorUtil;
+
+import spark.components.Application;
+import spark.components.ArrowDirection;
+import spark.components.Callout;
+import spark.core.SpriteVisualElement;
+import spark.skins.mobile.CalloutSkin;
+
+use namespace mx_internal;
+
+/**
+ *  The arrow skin part for CalloutSkin.
+ *
+ *  @see spark.skin.mobile.CalloutSkin
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 3
+ *  @productversion Flex 4.5.2
+ */
+public class CalloutArrow extends UIComponent
+{
+    public function CalloutArrow()
+    {
+        super();
+
+        useBackgroundGradient = true;
+
+        var applicationDPI:Number = Application(FlexGlobals.topLevelApplication).applicationDPI;
+
+        // Copy DPI-specific values from CalloutSkin
+        switch (applicationDPI)
+        {
+            case DPIClassification.DPI_320:
+            {
+                gap = 16;
+                backgroundGradientHeight = 220;
+                highlightWeight = 2;
+
+                break;
+            }
+            case DPIClassification.DPI_240:
+            {
+                gap = 12;
+                backgroundGradientHeight = 165;
+                highlightWeight = 1;
+
+                break;
+            }
+            default:
+            {
+                // default DPI_160
+                gap = 8;
+                backgroundGradientHeight = 110;
+                highlightWeight = 1;
+
+                break;
+            }
+        }
+    }
+
+    /**
+     *  A gap on the frame-adjacent side of the arrow graphic to avoid
+     *  drawing past the CalloutSkin backgroundCornerRadius.
+     *
+     *
The default implementation matches the gap value with the
+     *  backgroundCornerRadius value in CalloutSkin.

+     *
+     *  @see spark.skins.mobile.CalloutSkin#backgroundCornerRadius
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    protected var gap:Number;
+
+    /**
+     *  @copy spark.skins.mobile.CalloutSkin#backgroundGradientHeight
+     */
+    protected var backgroundGradientHeight:Number;
+
+    /**
+     *  @copy spark.skins.mobile.CalloutSkin#highlightWeight
+     */
+    private var highlightWeight:Number;
+
+    /**
+     *  @copy spark.skins.mobile.CalloutSkin#useBackgroundGradient
+     */
+    private var useBackgroundGradient:Boolean;
+
+    /**
+     *  @copy spark.skins.mobile.CalloutSkin#borderColor
+     */
+    protected var borderColor:Number;
+
+    /**
+     *  @copy spark.skins.mobile.CalloutSkin#borderThickness
+     */
+    protected var borderThickness:Number = NaN;
+
+    /**
+     *  @private
+     *  A sibling of the arrow used to erase the drop shadow in CalloutSkin
+     */
+    private var eraseFill:Sprite;
+
+    /**
+     * @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        // eraseFill has the same position and arrow shape in order to erase
+        // the drop shadow under the arrow when backgroundAlpha < 1
+        eraseFill = new Sprite();
+        eraseFill.blendMode = BlendMode.ERASE;
+
+        // layer eraseFill below the arrow
+        parent.addChildAt(eraseFill, parent.getChildIndex(this));
+    }
+
+    /**
+     * @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        graphics.clear();
+        eraseFill.graphics.clear();
+
+        var calloutSkin:CalloutSkin = (parent as CalloutSkin);
+        var hostComponent:Callout = calloutSkin.hostComponent;
+        var arrowDirection:String = hostComponent.arrowDirection;
+
+        if (arrowDirection == ArrowDirection.NONE)
+            return;
+
+        // when drawing the arrow, compensate for cornerRadius via padding
+        var arrowGraphics:Graphics = this.graphics;
+        var eraseGraphics:Graphics = eraseFill.graphics;
+        var arrowWidth:Number = unscaledWidth;
+        var arrowHeight:Number = unscaledHeight;
+        var arrowX:Number = 0;
+        var arrowY:Number = 0;
+        var arrowTipX:Number = 0;
+        var arrowTipY:Number = 0;
+        var arrowEndX:Number = 0;
+        var arrowEndY:Number = 0;
+
+        var showBorder:Boolean = !isNaN(borderThickness);
+        var borderWeight:Number = showBorder ? borderThickness : 0;
+        var borderHalf:Number = borderWeight / 2;
+        var isHorizontal:Boolean = false;
+
+        if ((arrowDirection == ArrowDirection.LEFT) ||
+            (arrowDirection == ArrowDirection.RIGHT))
+        {
+            isHorizontal = true;
+
+            arrowX = -borderHalf;
+            arrowY = gap;
+            arrowHeight = arrowHeight - (gap * 2);
+
+            arrowTipX = arrowWidth - borderHalf;
+            arrowTipY = arrowY + (arrowHeight / 2);
+
+            arrowEndX = arrowX;
+            arrowEndY = arrowY + arrowHeight;
+
+            // flip coordinates to point left
+            if (arrowDirection == ArrowDirection.LEFT)
+            {
+                arrowX = arrowWidth - arrowX;
+                arrowTipX = arrowWidth - arrowTipX;
+                arrowEndX = arrowWidth - arrowEndX;
+            }
+        }
+        else
+        {
+            arrowX = gap;
+            arrowY = -borderHalf;
+            arrowWidth = arrowWidth - (gap * 2);
+
+            arrowTipX = arrowX + (arrowWidth / 2);
+            arrowTipY = arrowHeight - borderHalf;
+
+            arrowEndX = arrowX + arrowWidth;
+            arrowEndY = arrowY;
+
+            // flip coordinates to point up
+            if (hostComponent.arrowDirection == ArrowDirection.UP)
+            {
+                arrowY = arrowHeight - arrowY;
+                arrowTipY = arrowHeight - arrowTipY;
+                arrowEndY = arrowHeight - arrowEndY;
+            }
+        }
+
+        var commands:Vector.<int> = new Vector.<int>(3, true);
+        commands[0] = GraphicsPathCommand.MOVE_TO;
+        commands[1] = GraphicsPathCommand.LINE_TO;
+        commands[2] = GraphicsPathCommand.LINE_TO;
+
+        var coords:Vector.<Number> = new Vector.<Number>(6, true);
+        coords[0] = arrowX;
+        coords[1] = arrowY;
+        coords[2] = arrowTipX
+        coords[3] = arrowTipY;
+        coords[4] = arrowEndX
+        coords[5] = arrowEndY;
+
+        var backgroundColor:Number = getStyle("backgroundColor");
+        var backgroundAlpha:Number = getStyle("backgroundAlpha");
+
+        if (useBackgroundGradient)
+        {
+            var backgroundColorTop:Number = ColorUtil.adjustBrightness2(backgroundColor,
+                CalloutSkin.BACKGROUND_GRADIENT_BRIGHTNESS_TOP);
+            var backgroundColorBottom:Number = ColorUtil.adjustBrightness2(backgroundColor,
+                CalloutSkin.BACKGROUND_GRADIENT_BRIGHTNESS_BOTTOM);
+
+            // translate the gradient based on the arrow position
+            MobileSkin.colorMatrix.createGradientBox(unscaledWidth,
+                backgroundGradientHeight, Math.PI / 2, 0, -getLayoutBoundsY());
+
+            arrowGraphics.beginGradientFill(GradientType.LINEAR,
+                [backgroundColorTop, backgroundColorBottom],
+                [backgroundAlpha, backgroundAlpha],
+                [0, 255],
+                MobileSkin.colorMatrix);
+        }
+        else
+        {
+            arrowGraphics.beginFill(backgroundColor, backgroundAlpha);
+        }
+
+        // cover the adjacent border from the callout frame
+        if (showBorder)
+        {
+            var coverX:Number = 0;
+            var coverY:Number = 0;
+            var coverWidth:Number = 0;
+            var coverHeight:Number = 0;
+
+            switch (arrowDirection)
+            {
+                case ArrowDirection.UP:
+                {
+                    coverX = arrowX;
+                    coverY = arrowY;
+                    coverWidth = arrowWidth;
+                    coverHeight = borderWeight;
+                    break;
+                }
+                case ArrowDirection.DOWN:
+                {
+                    coverX = arrowX;
+                    coverY = -borderWeight;
+                    coverWidth = arrowWidth;
+                    coverHeight = borderWeight;
+                    break;
+                }
+                case ArrowDirection.LEFT:
+                {
+                    coverX = arrowX;
+                    coverY = arrowY;
+                    coverWidth = borderWeight;
+                    coverHeight = arrowHeight;
+                    break;
+                }
+                case ArrowDirection.RIGHT:
+                {
+                    coverX = -borderWeight;
+                    coverY = arrowY;
+                    coverWidth = borderWeight;
+                    coverHeight = arrowHeight;
+                    break;
+                }
+            }
+
+            arrowGraphics.drawRect(coverX, coverY, coverWidth, coverHeight);
+        }
+
+        // erase the drop shadow from the CalloutSkin
+        if (backgroundAlpha < 1)
+        {
+            // move eraseFill to the same position as the arrow
+            eraseFill.x = getLayoutBoundsX()
+            eraseFill.y = getLayoutBoundsY();
+
+            // draw the arrow shape
+            eraseGraphics.beginFill(0, 1);
+            eraseGraphics.drawPath(commands, coords);
+            eraseGraphics.endFill();
+        }
+
+        // draw arrow path
+        if (showBorder)
+            arrowGraphics.lineStyle(borderThickness, borderColor, 1, true);
+
+        arrowGraphics.drawPath(commands, coords);
+        arrowGraphics.endFill();
+
+        // adjust the highlight position to the origin of the callout
+        var isArrowUp:Boolean = (arrowDirection == ArrowDirection.UP);
+        var offsetY:Number = (isArrowUp) ? unscaledHeight : -getLayoutBoundsY();
+
+        // highlight starts after the backgroundCornerRadius
+        var highlightX:Number = gap - getLayoutBoundsX();
+
+        // highlight Y position is based on the stroke weight
+        var highlightOffset:Number = (highlightWeight * 1.5);
+        var highlightY:Number = highlightOffset + offsetY;
+
+        // highlight width spans the callout width minus the corner radius
+        var highlightWidth:Number = IVisualElement(calloutSkin).getLayoutBoundsWidth() - (gap * 2);
+
+        if (isHorizontal)
+        {
+            highlightWidth -= arrowWidth;
+
+            if (arrowDirection == ArrowDirection.LEFT)
+                highlightX += arrowWidth;
+        }
+
+        // highlight on the top edge is drawn in the arrow only in the UP direction
+        if (useBackgroundGradient)
+        {
+            if (isArrowUp)
+            {
+                // highlight follows the top edge, including the arrow
+                var rightWidth:Number = highlightWidth - arrowWidth;
+
+                // highlight style
+                arrowGraphics.lineStyle(highlightWeight, 0xFFFFFF, 0.2 * backgroundAlpha);
+
+                // in the arrow coordinate space, the highlightX must be less than 0
+                if (highlightX < 0)
+                {
+                    arrowGraphics.moveTo(highlightX, highlightY);
+                    arrowGraphics.lineTo(arrowX, highlightY);
+
+                    // compute the remaining highlight
+                    rightWidth -= (arrowX - highlightX);
+                }
+
+                // arrow highlight (adjust Y downward)
+                coords[1] = arrowY + highlightOffset;
+                coords[3] = arrowTipY + highlightOffset;
+                coords[5] = arrowEndY + highlightOffset;
+                arrowGraphics.drawPath(commands, coords);
+
+                // right side
+                if (rightWidth > 0)
+                {
+                    arrowGraphics.moveTo(arrowEndX, highlightY);
+                    arrowGraphics.lineTo(arrowEndX + rightWidth, highlightY);
+                }
+            }
+            else
+            {
+                // straight line across the top
+                arrowGraphics.lineStyle(highlightWeight, 0xFFFFFF, 0.2 * backgroundAlpha);
+                arrowGraphics.moveTo(highlightX, highlightY);
+                arrowGraphics.lineTo(highlightX + highlightWidth, highlightY);
+            }
+        }
+    }
+}
+}


OFC-522 Cannot submit record if there are missing (but approved) values

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/ui/component/input/FormItemContextMenu.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/ui/component/input/FormItemContextMenu.as
@@ -14,6 +14,7 @@
 	import org.openforis.collect.model.proxy.EntityProxy;
 	import org.openforis.collect.ui.component.detail.AttributeFormItem;
 	import org.openforis.collect.ui.component.detail.CollectFormItem;
+	import org.openforis.idm.metamodel.validation.ValidationResultFlag;

 	/**
 	 * @author M. Togna
@@ -67,7 +68,8 @@
 			if(_formItem.parentEntity != null) {
 				var nodeName:String = _formItem.nodeDefinition.name;
 				var count:int = _formItem.parentEntity.getCount(nodeName);
-				if(count == 0) {
+				var minCountValid:ValidationResultFlag = _formItem.parentEntity.childrenMinCountValidationMap.get(nodeName);
+				if(count == 0 || minCountValid == ValidationResultFlag.ERROR) {
 					switch(step) {
 						case CollectRecord$Step.ENTRY:
 							items.push(SET_BLANK_ON_FORM);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.rpc.xml
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12625
Author:   mhorn@adobe.com
Date:     2009-12-07T21:50:25.279856Z

Log Message:
-----------
asdoc updates for l10n; add examples

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/spark/src/spark/filters/GlowFilter.as
+++ frameworks/projects/spark/src/spark/filters/GlowFilter.as
@@ -65,6 +65,7 @@
  *  />
  *  </pre>
  *
+ * @see flash.filters.GlowFilter
  * @see flash.display.BitmapData#applyFilter()
  * @see flash.display.DisplayObject#filters
  * @see flash.display.DisplayObject#cacheAsBitmap
@@ -73,6 +74,8 @@
  * @see flash.filters.DropShadowFilter#distance
  * @see flash.filters.DropShadowFilter#angle
  *
+ * @includeExample examples/GlowFilterExample.mxml
+ *
  * @langversion 3.0
  * @playerversion Flash 10
  * @playerversion AIR 1.5


clean up

clean up

--- source/com/kemsky/Stream.as
+++ source/com/kemsky/Stream.as
@@ -493,7 +493,7 @@
          * </pre>
          * @internal mutable
          */
-        public function addItem(value:*, index:int = 0):void
+        public function addItem(value:*, index:int = NaN):void
         {
             if(arguments.length == 1)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18521
Author:   deeptika@adobe.com
Date:     2010-11-10T12:28:10.614317Z

Log Message:
-----------
Adding automation support for selection using key board.
Removing invisible columns while calculating automation value of a renderer

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

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDataGridAutomationImpl.as

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDataGridAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDataGridAutomationImpl.as
@@ -269,8 +269,8 @@
 		 * @private
 		 */
 		protected function recordDGHeaderClickEvent(item:IGridItemRenderer,
-												   trigger:Event,
-												   cacheable:Boolean=false):void
+													trigger:Event,
+													cacheable:Boolean=false):void
 		{
 			//recordAutomatableEvent(event, cacheable);
 		}
@@ -548,19 +548,22 @@
 			for (var col:int = 0; col < listItems[row].length; col++)
 			{
 				var i:IVisualElement = listItems[row][col];
-				if(i == grid.editor.editedItemRenderer)
-					i = grid.itemEditorInstance;
-				var itemDelegate:IAutomationObject = i as IAutomationObject;
-				var s:String = (useName
-					? itemDelegate.automationName
-					: itemDelegate.automationValue.join(" | "));
-				if ( i == item )
-				{
-					// we got a valid item renderer
-					s= "*" + s + "*";
-					validItemRendererFound= true;
-				}
-				result.push(s);
+				if(i != null)	//can be null if column is not visible
+				{
+					if(i == grid.editor.editedItemRenderer)
+						i = grid.itemEditorInstance;
+					var itemDelegate:IAutomationObject = i as IAutomationObject;
+					var s:String = (useName
+						? itemDelegate.automationName
+						: itemDelegate.automationValue.join(" | "));
+					if ( i == item )
+					{
+						// we got a valid item renderer
+						s= "*" + s + "*";
+						validItemRendererFound= true;
+					}
+					result.push(s);
+				}
 			}

 			if(isHeader && (validItemRendererFound==false))
@@ -673,7 +676,7 @@
 				case KeyboardEvent.KEY_DOWN:
 				{
 					grid.setFocus();
-					return help.replayKeyDownKeyUp(uiComponent, KeyboardEvent(interaction).keyCode);
+					return help.replayKeyDownKeyUp(uiComponent, KeyboardEvent(interaction).keyCode, KeyboardEvent(interaction).ctrlKey, KeyboardEvent(interaction).shiftKey, KeyboardEvent(interaction).altKey);
 				}
 				case SparkDataGridItemSelectEvent.SELECT_INDEX:
 				case SparkDataGridItemSelectEvent.SELECT:


Transferred from the Adobe Open Source Subversion Repository

Revision: 15587
Author:   sameer@adobe.com
Date:     2010-04-20T05:29:09.135493Z

Log Message:
-----------
Merge from 4.x to trunk
QE notes:
Doc notes:
Bugs: http://bugs.adobe.com/jira/browse/FLEXDMV-2378
Reviewer: Sreeni
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/controls/advancedDataGridClasses/AdvancedDataGridGroupItemRenderer.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/controls/listClasses/AdvancedListBase.as</path>

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

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridGroupItemRenderer.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridGroupItemRenderer.as
@@ -28,6 +28,7 @@
 import mx.core.IFlexDisplayObject;
 import mx.core.IFlexModuleFactory;
 import mx.core.IFontContextComponent;
+import mx.core.ILayoutDirectionElement;
 import mx.core.IToolTip;
 import mx.core.IUITextField;
 import mx.core.SpriteAsset;
@@ -367,6 +368,11 @@
                 {
                     disclosureIcon = disclosureInstance;
                 }
+
+				// Let the disclosureIcon inherit the layoutDirection
+				if (disclosureIcon is ILayoutDirectionElement)
+					ILayoutDirectionElement(disclosureIcon).layoutDirection = null;
+

                 addChild(disclosureIcon as DisplayObject);
                 // set the x position


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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarButtonAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarButtonAutomationImpl.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Removed the variable "placeholder". penEnabled was also removed and _editMode is used universally throughout instead.

--- WeaveUI/src/weave/ui/PenMouse.as
+++ WeaveUI/src/weave/ui/PenMouse.as
@@ -65,24 +65,30 @@
 		}

 		public var drawing:Boolean = false;
-		public const penEnabled:LinkableBoolean = newLinkableChild( this, LinkableBoolean );
 		public const coords:LinkableString = newLinkableChild( this, LinkableString, handleCoordsChange ); //This is used for sessiong all of the coordinates.
 		public const lineWidth:LinkableNumber = newLinkableChild( this, LinkableNumber, invalidateDisplayList ); //Allows user to change the size of the line.
 		public const lineColor:LinkableNumber = newLinkableChild( this, LinkableNumber, invalidateDisplayList ); //Allows the user to change the color of the line.
-		private var placeholder:int = 0; //This is necessary for drawing the lines. The placeholder keeps track of what has been drawn so there is no re-drawing.
 		private var _coordsArrays:Array = []; // parsed from coords LinkableString
-		private var _editMode:Boolean = false; // true when editing
+		public const _editMode:LinkableBoolean = newLinkableChild( this, LinkableBoolean, handleEditModeChange );; // true when editing
+
+		public function handleEditModeChange():void
+		{
+			if( _editMode.value == true )
+				editMode = true;
+			else
+				editMode = false;
+		}

 		public function get editMode():Boolean
 		{
-			return _editMode;
+			return _editMode.value;
 		}
 		public function set editMode(value:Boolean):void
 		{
-			if (_editMode == value)
+			if (_editMode.value == value)
 				return;

-			_editMode = value;
+			_editMode.value = value;

 			if (value)
 			{
@@ -92,7 +98,6 @@
 				addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown );
 				addEventListener(MouseEvent.MOUSE_UP, handleMouseUp );
 				addEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove );
-				penEnabled.value = true;
 			}
 			else
 			{
@@ -101,7 +106,6 @@
 				removeEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove );

 				CustomCursorManager.removeAllCursors();
-				penEnabled.value = false;
 			}
 			invalidateDisplayList();
 		}
@@ -246,7 +250,7 @@
 				if( ( getLinkableContainer(e.mouseTarget) as ILinkableContainer).getLinkableChildren().getObject( PEN_OBJECT_NAME ) )
 				{
 					var penObject:ILinkableObject = ( getLinkableContainer(e.mouseTarget) as ILinkableContainer).getLinkableChildren().getObject( PEN_OBJECT_NAME );
-					if( ( penObject as PenMouse ).penEnabled.value == true )
+					if( ( penObject as PenMouse ).editMode == true )
 					{
 						_penToolMenuItem.caption = DISABLE_PEN;
 						( penObject as PenMouse).editMode = true;
@@ -276,7 +280,6 @@
 				// enable pen

 				penTool.editMode = true;
-				penTool.penEnabled.value = true;
 				_penToolMenuItem.caption = DISABLE_PEN;
 				_removeDrawingsMenuItem.enabled = true;
 				CustomCursorManager.showCursor(CustomCursorManager.PEN_CURSOR, CursorManagerPriority.HIGH, -3, -22);
@@ -285,7 +288,6 @@
 			{
 				// disable pen
 				penTool.editMode = false;
-				penTool.penEnabled.value = false;

 				_penToolMenuItem.caption = ENABLE_PEN;
 			}


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

--- frameworks/projects/framework/asdoc/en_US/mx/core/examples/RuntimeDPIProviderExample.as
+++ frameworks/projects/framework/asdoc/en_US/mx/core/examples/RuntimeDPIProviderExample.as
@@ -1,3 +1,21 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+//
+//      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
 {
 import flash.system.Capabilities;


Transferred from the Adobe Open Source Subversion Repository

Revision: 22122
Author:   tkraikit@adobe.com
Date:     2011-08-20T00:15:33.035505Z

Log Message:
-----------
Updated DateTimeFormatterEx code from globalization team. Addresses some last performance concerns with certain locales.

QE notes: please focus on locale support as well as performance for switching locales
Doc notes: none
Bugs: n/a
Reviewer: Kyu
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as

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

--- frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as
+++ frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as
@@ -17,6 +17,7 @@

 import mx.core.mx_internal;
 import mx.utils.ObjectUtil;
+import mx.utils.StringUtil;

 import spark.formatters.DateTimeFormatter;

@@ -35,6 +36,16 @@
  *  Another feature is the date time pattern analysis which tells relative
  *  positions of each of formatting element.

  *
+ *
There are maximum year and minimum year this class can handle.

+ *

+ *
Item	Constant	Value

+ *
Maximum year	MAX_YEAR	30827

+ *
Minimum year	MIN_YEAR	1601

+ *

+ *
This limitation is inherited from the underlying technology used by this
+ *  class. (Spark DateTimeFormatter uses Flash DateTimeFormatter, which uses
+ *  platform OS calls.) The limitation value is same across the platforms.

+ *
  *  @see spark.formatters.DateTimeFormatter
  *  @see flash.globalization.DateTimeFormatter
  *
@@ -60,6 +71,16 @@
     public static const DATESTYLE_yMMM:String = "yMMM";
     public static const DATESTYLE_yMMMM:String = "yMMMM";
     public static const DATESTYLE_MMMEEEd:String = "MMMEEEd";
+
+    /**
+     *  Maximum year supported by DateTimeFormatterEx class.
+     */
+    public static const MAX_YEAR:uint = 30827;
+
+    /**
+     *  Minimum year supported by DateTimeFormatterEx class.
+     */
+    public static const MIN_YEAR:uint = 1601;

     // Number of milli seconds for a day
     private static const MILLISECONDS_PER_DAY:int = 1000 * 60 * 60 * 24;
@@ -77,7 +98,7 @@
         /(^(?:[^'m]*(?:'[^']*')*[^m']*)*)(m+('分'|分|'분'|분)?)/;
     private static const REGEXP_SECOND:RegExp =
         /(^(?:[^'s]*(?:'[^']*')*[^s']*)*)(s+('秒'|秒|'초'|초)?)/;
-    private static const REGEXP_AMPM:RegExp =  /^(.*)(a)(?:[^']*'[^']*')*[^']*$/;
+    private static const REGEXP_AMPM:RegExp =  /^(.*)(a)(?:[^']*'[^']*')*[^']*$/;
     private static const REGEXP_DAYOFWEEK:RegExp =
         /(^(?:[^'E]*(?:'[^']*')*[^E']*)*)(E+)/;

@@ -101,6 +122,10 @@
     */
     private static const REGEXP_LOCALEID:RegExp =
         /([a-z]+)?(?:[-_]([A-Z][a-z]+))?(?:[-_]([A-Z]+))?([a-zA-Z-]+)?(?:@(.*))?/;
+
+    private static const REGEXP_L:RegExp = /(?:^[^'L]*(?:'[^']*')*[^L']*)(L+)/;
+
+    private static const REGEXP_c:RegExp = /(?:^[^'c]*(?:'[^']*')*[^c']*)(c+)/;

     // Format pattern for yMMM
     private static const FORMATPATTERNLIST_yMMM:Vector.<FormatPattern> =
@@ -223,16 +248,34 @@
             new FormatPattern("d MMM, E", ["bg"]),
             new FormatPattern("d MMMM E", ["tr"]),
             new FormatPattern("E d LLL", ["fa"]),
-            new FormatPattern("E d MMM", ["agq", "ar", "bas", "bm", "bn", "ca", "dje", "dua", "dyo", "en_GB", "en_IN", "es", "ewo", "ff", "fr", "fur", "gl", "id", "kab", "khq", "ksf", "ln", "lu", "mfe", "mg", "mua", "nl", "nmg", "nus", "rn", "ses", "sg", "shi", "shi_Tfng", "sq", "sv", "swc", "th", "to", "twq", "vi", "yav"]),
-            new FormatPattern("E d. MMM", ["da", "fi", "gsw", "is", "nb", "nn", "rm", "sr", "sr_Latn"]),
+            new FormatPattern("E d MMM", [
+                "agq", "ar", "bas", "bm", "bn", "ca", "dje", "dua",
+                "dyo", "en_GB", "en_IN", "es", "ewo", "ff", "fr",
+                "fur", "gl", "id", "kab", "khq", "ksf", "ln", "lu",
+                "mfe", "mg", "mua", "nl", "nmg", "nus", "rn", "ses",
+                "sg", "shi", "shi_Tfng", "sq", "sv", "swc", "th", "to",
+                "twq", "vi", "yav"]),
+            new FormatPattern("E d. MMM", [
+                "da", "fi", "gsw", "is", "nb", "nn", "rm", "sr",
+                "sr_Latn"]),
             new FormatPattern("E dd MMM", ["en_ZA", "en_ZW"]),
-            new FormatPattern("E MMM d", ["fil", "mk", "root", "trv"]),
-            new FormatPattern("E, d MMM", ["be", "el", "en_AU", "en_CA", "en_HK", "en_MT", "en_NZ", "en_SG", "gu", "hi", "kn", "mr", "pl", "ro", "ta", "te", "uk"]),
+            new FormatPattern("E MMM d", ["fil", "mk", /*"root",*/ "trv"]),
+            new FormatPattern("E, d MMM", [
+                "be", "el", "en_AU", "en_CA", "en_HK", "en_MT", "en_NZ", "en_SG",
+                "gu", "hi", "kn", "mr", "pl", "ro", "ta", "te",
+                "uk"]),
             new FormatPattern("E, d בMMM", ["he"]),
-            new FormatPattern("E, d. MMM", ["cs", "de", "et", "hr", "lv", "sk", "sl", "wae"]),
+            new FormatPattern("E, d. MMM", [
+                "cs", "de", "et", "hr", "lv", "sk", "sl", "wae"]),
             new FormatPattern("E, d/MM", ["pt_PT"]),
             new FormatPattern("E, dd. MMM", ["bs"]),
-            new FormatPattern("E, MMM d", ["af", "ak", "am", "asa", "bem", "bez", "brx", "cgg", "dav", "ebu", "ee", "en", "es_US", "eu", "guz", "ha", "ig", "jmc", "kam", "kde", "ki", "kln", "ksb", "lag", "lg", "luo", "luy", "mas", "mer", "mgh", "naq", "nd", "nyn", "rof", "rwk", "saq", "sbp", "sn", "so", "sw", "teo", "tzm", "vai", "vai_Latn", "vun", "xog", "yo", "zu"]),
+            new FormatPattern("E, MMM d", [
+                "af", "ak", "am", "asa", "bem", "bez", "brx", "cgg",
+                "dav", "ebu", "ee", "en", "es_US", "eu", "guz", "ha",
+                "ig", "jmc", "kam", "kde", "ki", "kln", "ksb", "lag",
+                "lg", "luo", "luy", "mas", "mer", "mgh", "naq", "nd",
+                "nyn", "rof", "rwk", "saq", "sbp", "sn", "so", "sw",
+                "teo", "tzm", "vai", "vai_Latn", "vun", "xog", "yo", "zu"]),
             new FormatPattern("E، dی MMM", ["ku"]),
             new FormatPattern("EEE d MMM", ["en_BE", "it"]),
             new FormatPattern("EEE dd MMM", ["en_BW", "en_BZ"]),
@@ -248,10 +291,13 @@
             new FormatPattern("M月d日E", ["zh", "zh_Hant"]),
         ];

-    // Process for FORMATPATTERNLIST_yMMMM_extra repeated. Locales list for MMMEEEd is compared with
-    // yMMM localelist and the missing ones data is extracted.
-    private static const FORMATPATTERNLIST_MMMEEEd_extra:Vector.<FormatPattern> =
+    // Process for FORMATPATTERNLIST_yMMMM_extra repeated.
+    // Locales list for MMMEEEd is compared with yMMM localelist and
+    // the missing ones data is extracted.
+    private static const
+    FORMATPATTERNLIST_MMMEEEd_extra:Vector.<FormatPattern> =
         new <FormatPattern> [
+            new FormatPattern("E MMM d", ["root"]),
             new FormatPattern("EEE MMM d", ["chr"]),
             new FormatPattern("EEE, MMM d", ["ksh"]),
         ];
@@ -333,7 +379,7 @@
         */
         if (super.timeStyle == "custom")
             super.timeStyle = (value == "none") ? "long" : "none";
-
+
         super.timeStyle = value;
     }

@@ -485,6 +531,8 @@
         return element ? element["index"] : -1;
     }

+    [Bindable("change")]
+
     /**
      *  Formatting pattern for the day of week.
      *
@@ -726,7 +774,8 @@
         {
             _elementPatternList =
                 DateTimeFormatterEx.analysePattern(dateTimePattern,
-                    (super.dateStyle != "none"), (super.timeStyle != "none"));
+                    patternMayContainDateElements,
+                    patternMayContainTimeElements);
             addPrefixes(dateTimePattern, _elementPatternList);
         }

@@ -740,6 +789,72 @@
         _elementPatternList = null;
     }

+    //----------------------------------
+    //  patternMayContainDateElements
+    //----------------------------------
+
+    private function get patternMayContainDateElements():Boolean
+    {
+        switch (super.dateStyle)
+        {
+            case "none":
+                return false;
+            case "custom":
+                break;
+            default:    // "long", "medium" and "short"
+                return true;
+        }
+
+        switch (_dateTimeSkeletonPattern)
+        {
+            case DATESTYLE_yMMM:
+            case DATESTYLE_yMMMM:
+            case DATESTYLE_MMMEEEd:
+                return true;
+        }
+
+        /*
+        The precise answer here is: it is unknown if the pattern contains
+        any of date elements.
+        Therefore, we return the value to say "it may contain some date
+        elements".
+        */
+        return true;
+    }
+
+    //----------------------------------
+    //  patternMayContainTimeElements
+    //----------------------------------
+
+    private function get patternMayContainTimeElements():Boolean
+    {
+        switch (super.timeStyle)
+        {
+            case "none":
+                return false;
+            case "custom":
+                break;
+            default:    // "long", "medium" and "short"
+                return true;
+        }
+
+        switch (_dateTimeSkeletonPattern)
+        {
+            case DATESTYLE_yMMM:
+            case DATESTYLE_yMMMM:
+            case DATESTYLE_MMMEEEd:
+                return false;
+        }
+
+        /*
+        The precise answer here is: it is unknown if the pattern contains
+        any of time elements.
+        Therefore, we return the value to say "it may contain some time
+        elements".
+        */
+        return true;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Private Methods
@@ -749,7 +864,7 @@
     /**
      *  @private
      *  Special handling for locales that need prefix for pattern elements.
-     *
+     *
      *  The regular expression becomes too complex to properly handle prefixed
      *  embeded strings. (Postfixes are ok, however.)
      *  This function adds the proper prefix to the elements.
@@ -824,12 +939,23 @@
         if (pattern)
         {
             // 'L' is not supported by most systems so relace with 'M'
-            // Problem if pattern has L or c in string literals.
-            // TBD: Discuss with Masa.
-            pattern = pattern.replace(/L/g, "M");
-            // ru locale uses c as symbol for day name of the week instead E.
-            // catering to only skeleton patterns.
-            pattern = pattern.replace(/ccc/g, "EEE");
+            pattern = pattern.replace(REGEXP_L, function(
+                matchedSubstring:String,
+                capturedMatch1:String, index:int, str:String):String
+            {
+                return replaceString(matchedSubstring,
+                    capturedMatch1, index, str, "M");
+            });
+
+            // ru locale uses "c" as the symbol for the day name of the week
+            // instead "E".
+            pattern = pattern.replace(REGEXP_c, function(
+                matchedSubstring:String,
+                capturedMatch1:String, index:int, str:String):String
+            {
+                return replaceString(matchedSubstring,
+                    capturedMatch1, index, str, "E");
+            });
         }

         return pattern;
@@ -946,6 +1072,17 @@
         };
     }

+    private function replaceString(matchedSubstring:String,
+                                   capturedMatch1:String, index:int, str:String,
+                                   newChar:String):String
+    {
+        const len:int = capturedMatch1.length;
+        const s:String = StringUtil.repeat(newChar, len);
+        const n:String = matchedSubstring.substr(0,
+            matchedSubstring.length - len) + s;
+        return n;
+    }
+
     private function updatePattern():void
     {
         if (!_dateTimeSkeletonPattern)
@@ -974,15 +1111,44 @@
                                            analyseDateElements:Boolean,
                                            analyseTimeElements:Boolean):Object
     {
+        const elementList:Array = new Array();
+
+        if (analyseDateElements)
+            DateTimeFormatterEx.extractDateElements(pattern, elementList);
+
+        if (analyseTimeElements)
+            DateTimeFormatterEx.extractTimeElements(pattern, elementList);
+
+        elementList.sortOn("index", Array.NUMERIC);
+        const processedElementList:Object = new Object();
+        for (var i:int = 0; i < elementList.length; i++)
+        {
+            var element:Object = new Object();
+            element["index"] = i;
+            element["pattern"] = elementList[i]["pattern"];
+            var name:String = elementList[i]["name"];
+            processedElementList[name] = element;
+        }
+
+        return processedElementList;
+    }
+
+    /**
+     *  @private
+     *  extractDateElements() function.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 11
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    private static function extractDateElements(
+        pattern:String, elementList:Array):void
+    {
         var regExpOut:Object;
-        var element:Object;
-        const array:Array = new Array();
-
-        const iBegining:uint = analyseDateElements ? 0 : 3;
-        const iEnd:uint = analyseTimeElements ? 8 : 2;
-        for (var i:int = iBegining; i <= iEnd; i++)
-        {
-            element = null;
+        for (var i:int = 0; i < 4; i++)
+        {
+            var element:Object = null;
             switch (i)
             {
                 case 0:
@@ -1007,34 +1173,6 @@
                                 + (regExpOut[1] as String).length) };
                     break;
                 case 3:
-                    regExpOut = REGEXP_HOUR.exec(pattern);
-                    if (regExpOut)
-                        element = { name: "hour", pattern: regExpOut[2],
-                            index: ((regExpOut["index"] as int)
-                                + (regExpOut[1] as String).length) };
-                    break;
-                case 4:
-                    regExpOut = REGEXP_MINUTE.exec(pattern);
-                    if (regExpOut)
-                        element = { name: "minute", pattern: regExpOut[2],
-                            index: ((regExpOut["index"] as int)
-                                + (regExpOut[1] as String).length) };
-                    break;
-                case 5:
-                    regExpOut = REGEXP_SECOND.exec(pattern);
-                    if (regExpOut)
-                        element = { name: "second", pattern: regExpOut[2],
-                            index: ((regExpOut["index"] as int)
-                                + (regExpOut[1] as String).length) };
-                    break;
-                case 6:
-                    regExpOut = REGEXP_AMPM.exec(pattern);
-                    if (regExpOut)
-                        element = { name: "ampm", pattern: regExpOut[2],
-                            index: ((regExpOut["index"] as int)
-                                + (regExpOut[1] as String).length) };
-                    break;
-                case 7:
                     regExpOut = REGEXP_DAYOFWEEK.exec(pattern);
                     if (regExpOut)
                         element = { name: "dayOfWeek", pattern: regExpOut[2],
@@ -1043,21 +1181,60 @@
                     break;
             }
             if (element)
-                array.push(element);
-        }
-        array.sortOn("index", Array.NUMERIC);
-        const object:Object = new Object();
-        var name:String;
-        for (i = 0; i < array.length; i++)
-        {
-            element = new Object();
-            element["index"] = i;
-            element["pattern"] = array[i]["pattern"];
-            name = array[i]["name"];
-            object[name] = element;
-        }
-
-        return object;
+                elementList.push(element);
+        }
+    }
+
+    /**
+     *  @private
+     *  extractTimeElements() function.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 11
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    private static function extractTimeElements(
+        pattern:String, elementList:Array):void
+    {
+        var regExpOut:Object;
+        for (var i:int = 0; i < 4; i++)
+        {
+            var element:Object = null;
+            switch (i)
+            {
+                case 0:
+                    regExpOut = REGEXP_HOUR.exec(pattern);
+                    if (regExpOut)
+                        element = { name: "hour", pattern: regExpOut[2],
+                            index: ((regExpOut["index"] as int)
+                                + (regExpOut[1] as String).length) };
+                    break;
+                case 1:
+                    regExpOut = REGEXP_MINUTE.exec(pattern);
+                    if (regExpOut)
+                        element = { name: "minute", pattern: regExpOut[2],
+                            index: ((regExpOut["index"] as int)
+                                + (regExpOut[1] as String).length) };
+                    break;
+                case 2:
+                    regExpOut = REGEXP_SECOND.exec(pattern);
+                    if (regExpOut)
+                        element = { name: "second", pattern: regExpOut[2],
+                            index: ((regExpOut["index"] as int)
+                                + (regExpOut[1] as String).length) };
+                    break;
+                case 3:
+                    regExpOut = REGEXP_AMPM.exec(pattern);
+                    if (regExpOut)
+                        element = { name: "ampm", pattern: regExpOut[2],
+                            index: ((regExpOut["index"] as int)
+                                + (regExpOut[1] as String).length) };
+                    break;
+            }
+            if (element)
+                elementList.push(element);
+        }
     }
 }
 }


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

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

 package spark.automation.delegates.components.supportClasses
 {


I knew there was a reason I backed that by a HashMap intead of a Dictionary.  The class that wants
to update and remove entries from the list may very well not have a reference to the same object
that is stored in the PlayerList (base case is Names in a DSet getting updated/added/removed).  By
using a HashMap, we just need to ensure the hashCode() is the same, which is especially handy in
the display name update case where the MemberName.hashCode() is the memberId.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@483 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flex/PlayerList.as
+++ src/as/com/threerings/flex/PlayerList.as
@@ -21,8 +21,6 @@

 package com.threerings.flex {

-import flash.utils.Dictionary;
-
 import mx.collections.ArrayCollection;
 import mx.collections.Sort;

@@ -32,6 +30,8 @@
 import mx.core.ScrollPolicy;

 import com.threerings.util.Comparable;
+import com.threerings.util.Hashable;
+import com.threerings.util.HashMap;

 public class PlayerList extends VBox
 {
@@ -69,19 +69,19 @@

     public function clear () :void
     {
-        _values = new Dictionary();
+        _values.clear();
         _players.removeAll();
     }

     /**
      * The PlayerList is meant to include data that is at least as complicated as a Name, so to
-     * keep things simple and extendable, we require Comparable.  This allows the issue of passing
+     * keep things simple and extendable, we require Hashable.  This allows the issue of passing
      * the NameLabelCreator into the player renderer to be kept simple and straightforward and still
      * allow efficient item updating.
      */
-    public function addItem (value :Comparable) :void
-    {
-        var currentValue :Array = _values[value] as Array;
+    public function addItem (value :Hashable) :void
+    {
+        var currentValue :Array = _values.get(value) as Array;
         if (currentValue != null) {
             currentValue[1] = value;
             // this is the same array already contained in the list, so the proper renderer should
@@ -89,28 +89,26 @@
             _players.itemUpdated(currentValue);
         } else {
             currentValue = [_labelCreator, value];
-            _values[value] = currentValue;
+            _values.put(value, currentValue);
             _players.addItem(currentValue);
         }
     }

-    public function removeItem (value :Comparable) :void
-    {
-        var currentValue :Array = _values[value] as Array;
+    public function removeItem (value :Hashable) :void
+    {
+        var currentValue :Array = _values.remove(value) as Array;
         if (currentValue != null) {
             _players.removeItemAt(_players.getItemIndex(currentValue));
         }
-
-        delete _values[value];
     }

     /**
      * Notify the list that this value has changed internally, and the renderer should be told to
      * redraw its contents.
      */
-    public function itemUpdated (value :Comparable) :void
-    {
-        var currentValue :Array = _values[value] as Array;
+    public function itemUpdated (value :Hashable) :void
+    {
+        var currentValue :Array = _values.get(value) as Array;
         if (currentValue != null) {
             currentValue[1] = value;
             _players.itemUpdated(currentValue);
@@ -141,7 +139,7 @@
     protected var _labelCreator :NameLabelCreator;
     protected var _list :AmbidextrousList;
     protected var _players :ArrayCollection = new ArrayCollection();
-    protected var _values :Dictionary = new Dictionary();
+    protected var _values :HashMap = new HashMap();
 }
 }


Occam's razor. toString()ing an int in hex format is built-in to flash.
Didn't touch other stuff.

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

--- src/as/com/threerings/util/StringUtil.as
+++ src/as/com/threerings/util/StringUtil.as
@@ -470,13 +470,7 @@
      */
     public static function toHex (n :uint, width :uint) :String
     {
-        var result :String = "";
-        while (width > 0) {
-            result = HEX[n & 0x0f] + result;
-            n >>>= 4;
-            width --;
-        }
-        return result;
+        return prepad(n.toString(16), width, "0");
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.automation.delegates.controls.fileSystemClasses
 {


上传贴图修改

上传贴图修改

--- src/flash/display3D/Context3D.as
+++ src/flash/display3D/Context3D.as
@@ -336,7 +336,7 @@
 				currentTextures[name] = texture;
 				if (texture)
 				{
-					gl.activeTexture(WebGLRenderingContext["TEXTURE"+sampler]);
+					gl.activeTexture(gl["TEXTURE"+sampler]);
 					gl.bindTexture(gl.TEXTURE_2D, texture.texture);
 					gl.uniform1i(currentProgram.getUniformLocation(name), sampler);
 				}


no message

no message

--- packager/src/com/tuarua/FDB.as
+++ packager/src/com/tuarua/FDB.as
@@ -58,7 +58,7 @@
             isInited = true;
             sendCommand("r");
             dispatchEvent(new MessageEvent(MessageEvent.ON_MESSAGE, "[FDB]\n1. Open app on device\n2. " +
-                    "Set any breakpoints\n3.Type c to continue.\n4.Type h for help\n"));
+                    "Set any breakpoints\n3. Type c to continue.\n4.Type h for help\n"));
         }
         dispatchEvent(new MessageEvent(MessageEvent.ON_MESSAGE, s));
     }


autoExit isn't working. work around it.

autoExit isn't working. work around it.

--- exporter/src/main/as/flump/export/FlumpApp.as
+++ exporter/src/main/as/flump/export/FlumpApp.as
@@ -32,10 +32,6 @@
     }

     public function run () :void {
-        // If we don't support a global menu (like, on Windows), then
-        // auto exit when all windows are closed.
-        NA.autoExit = !(NativeApplication.supportsMenu);
-
         // Setup our global menu if we support it
         setupGlobalMenus();

@@ -119,6 +115,11 @@

     protected function closeProject (controller :ProjectController) :void {
         Arrays.removeFirst(_projects, controller);
+        // NativeApplication.autoExit is not working for us. On Windows and Linux, we exit
+        // when all project windows are closed.
+        if (!NativeApplication.supportsMenu && _projects.length == 0) {
+            NA.exit();
+        }
     }

     protected function getActiveProject () :ProjectController {


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

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


Remove extra newline.

Remove extra newline.

--- src/com/esri/builder/controllers/supportClasses/WidgetTypeLoader.as
+++ src/com/esri/builder/controllers/supportClasses/WidgetTypeLoader.as
@@ -194,7 +194,6 @@
             var moduleConfig:XML = readModuleConfig(config);
         }

-
         const builderModule:IBuilderModule = moduleInfo.factory.create() as IBuilderModule;
         if (builderModule)
         {


text()

text()

--- frameworks/projects/XML/as/src/XML.as
+++ frameworks/projects/XML/as/src/XML.as
@@ -765,7 +765,7 @@
 			var xmlChildren:Array = xml.getChildrenArray();
 			if(selfChldrn.length != xmlChildren.length)
 				return false;
-
+
 			for(i=0;i<selfChldrn.length;i++)
 			{
 				if(!selfChldrn[i].equals(xmlChildren[i]))
@@ -1467,7 +1467,15 @@
 		 */
 		public function text():XMLList
 		{
-			return null;
+			var list:XMLList = new XMLList();
+			var i:int;
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "text")
+					list.list.appendChild(_atributes[i]);
+			}
+			list.targetObject = this;
+			return list;
 		}

 		/**


calling Weave.dispose() on callback entry

--- WeaveJS/src/weavejs/core/CallbackCollection.as
+++ WeaveJS/src/weavejs/core/CallbackCollection.as
@@ -152,7 +152,7 @@
 						shouldRemoveEntry = WeaveAPI.SessionManager.objectWasDisposed(entry.context);
 					if (shouldRemoveEntry)
 					{
-						entry.dispose();
+						Weave.dispose(entry);
 						// remove the empty callback reference from the list
 						var removed:Array = _callbackEntries.splice(i--, 1); // decrease i because remaining entries have shifted
 						if (WeaveAPI.debugAsyncStack)
@@ -194,7 +194,7 @@
 					{
 						// Remove the callback by setting the function pointer to null.
 						// This is done instead of removing the entry because we may be looping over the _callbackEntries Array right now.
-						entry.dispose();
+						Weave.dispose(entry);
 					}
 				}
 			}
@@ -246,7 +246,7 @@
 			if (WeaveAPI.debugAsyncStack)
 				_oldEntries = _oldEntries ? _oldEntries.concat(_callbackEntries) : _callbackEntries.concat();
 			for each (entry in _callbackEntries)
-				entry.dispose();
+				Weave.dispose(entry);
 			_callbackEntries.length = 0;
 			_wasDisposed = true;


OFC-179 Also show text labels in forms when there are numbers e.g. "1. Label"

--- collect-flex/collect-flex-client/src/generated/flex/org/openforis/collect/metamodel/proxy/NodeDefinitionProxy.as
+++ collect-flex/collect-flex-client/src/generated/flex/org/openforis/collect/metamodel/proxy/NodeDefinitionProxy.as
@@ -7,28 +7,49 @@

 package org.openforis.collect.metamodel.proxy {
 	import mx.collections.IList;
-
+
+	import org.openforis.collect.util.CollectionUtil;
+	import org.openforis.collect.util.StringUtil;
+
+	/**
+	 * @author M. Togna
+	 * @author S. Ricci
+	 */
     [Bindable]
     [RemoteClass(alias="org.openforis.collect.metamodel.proxy.NodeDefinitionProxy")]
     public class NodeDefinitionProxy extends NodeDefinitionProxyBase {

-		public function getLabelText(language:String = "en"):String {
-			return getLabel(this.labels, NodeLabelProxy$Type.INSTANCE, language);
+		public function getLabelText(language:String = null, firstIfNotFound:Boolean = true):String {
+			var labelTypes:Array = [NodeLabelProxy$Type.INSTANCE, NodeLabelProxy$Type.HEADING, null];
+			var label:NodeLabelProxy = null;
+			for each (var type:NodeLabelProxy$Type in labelTypes) {
+				label = getLabel(type, language, false);
+				if(label != null) {
+					break;
+				}
+			}
+			if(label == null && firstIfNotFound) {
+				label = getLabel(null, language, true);
+			}
+			if(label != null) {
+				return label.text;
+			} else {
+				return null;
+			}
 		}

-		public static function getLabel(labels:IList, type:NodeLabelProxy$Type, language:String = "en"):String {
-			if(labels == null || labels.length <= 0) {
-				return null;
-			} else if(labels.length == 1) {
-				return NodeLabelProxy(labels.getItemAt(0)).text;
-			} else {
+		public function getLabel(type:NodeLabelProxy$Type = null, language:String = null, firstIfNotFound:Boolean = false):NodeLabelProxy {
+			if(CollectionUtil.isNotEmpty(labels)) {
 				for each(var label:NodeLabelProxy in labels) {
-					if(label.type == type && label.language == language) {
-						return label.text;
+					if(label.type == type && (language == null || label.language == language)) {
+						return label;
 					}
-				}
-				return (labels.getItemAt(0) as NodeLabelProxy).text;
+				}
+				if(firstIfNotFound) {
+					return (labels.getItemAt(0) as NodeLabelProxy);
+				}
 			}
+			return null;
 		}

     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 22454
Author:   aaltman@adobe.com
Date:     2011-09-08T20:59:24.887333Z

Log Message:
-----------
Reverting another part of 22422 for mustella tests

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as
@@ -387,6 +387,12 @@
     {
         super();

+        // This needs to be true so that we can show the soft keyboard if the
+        // user taps on the padding instead of on the StageText. If
+        // needsSoftKeyboard isn't set to true, requestSoftKeyboard would do
+        // nothing.
+        needsSoftKeyboard = true;
+
         _multiline = multiline;
         getStageText(true);