You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2018/10/24 17:24:06 UTC

[GitHub] aharui closed pull request #321: HttpService and related classes emulated

aharui closed pull request #321: HttpService and related classes emulated
URL: https://github.com/apache/royale-asjs/pull/321
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
index ba2148e59..09b58e6b6 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
@@ -180,6 +180,10 @@ internal class MXRoyaleClasses
 	import mx.messaging.errors.MessageSerializationError; MessageSerializationError;
 	import mx.rpc.http.SerializationFilter; SerializationFilter;
 	import mx.rpc.http.AbstractOperation; AbstractOperation;
+	import mx.events.MenuEvent; MenuEvent;
+	import mx.rpc.CallResponder; CallResponder;
+	import mx.rpc.http.Operation; Operation;
+	
 
 	COMPILE::JS
     {
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/events/MenuEvent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/events/MenuEvent.as
index a0a10423b..595cc2205 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/events/MenuEvent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/events/MenuEvent.as
@@ -425,6 +425,20 @@ public class MenuEvent extends ListEvent
         _item = value;
     }
 	
+	//----------------------------------
+	//  label
+	//----------------------------------
+	
+	/**
+	 *  The label text of the associated menu item.
+	 *  This is null for the menuShow and menuHide events. 
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public var label:String;
     //----------------------------------
     //  menu
     //----------------------------------
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/CallResponder.as b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/CallResponder.as
new file mode 100644
index 000000000..6c81ba39f
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/CallResponder.as
@@ -0,0 +1,177 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.rpc
+{
+	COMPILE::SWF {
+		import flash.events.EventDispatcher;
+	}
+		
+	COMPILE::JS {
+		import org.apache.royale.events.EventDispatcher;
+	}
+		
+	import mx.rpc.IResponder;
+	import mx.rpc.events.ResultEvent;
+	import mx.rpc.events.FaultEvent;
+	
+	import mx.utils.ArrayUtil;
+	
+	/**
+	 * Dispatched when an Operation invocation successfully returns.
+	 * @eventType mx.rpc.events.ResultEvent.RESULT 
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	[Event(name="result", type="mx.rpc.events.ResultEvent")]
+	
+	/**
+	 * Dispatched when an Operation call fails.
+	 * @eventType mx.rpc.events.FaultEvent.FAULT 
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	[Event(name="fault", type="mx.rpc.events.FaultEvent")]
+	
+	/**
+	 *  This component helps you manage the results for asynchronous calls made from
+	 *  RPC based services, typically from MXML components.  While each individual service
+	 *  and operation dispatches result and fault events, it is common to need to use the
+	 *  same operation in different parts of your application.  Using one event listener
+	 *  or lastResult value across the entire application can be awkward.  Rather than creating
+	 *  two service components which refer to the same service, you can use a simple lightweight
+	 *  CallResponder to manage the event listeners and lastResult value for a specific invocation
+	 *  of a service.
+	 *  <p>
+	 *  You set the token property of this component to the AsyncToken returned by the 
+	 *  service.  You can then add event listeners on this component instead of having to
+	 *  add them to each AsyncToken returned.   This component also maintains the
+	 *  lastResult property which is a copy of the value returned by the last successful
+	 *  result event dispatched by a token monitored by this service.  Though you can
+	 *  bind to either the <code>callResponder.token.result</code> or 
+	 *  <code>callResponder.lastResult</code>, the latter will be preserved while a second
+	 *  call to the same service is in progress while the former will be reset as soon
+	 *  as a new service invocation is started.
+	 *  </p>
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class CallResponder extends EventDispatcher implements IResponder 
+	{
+		private var _token:AsyncToken;
+		
+		[Bindable]
+		/**
+		 *  Each CallResponder dispatches result and fault events received
+		 *  from a single token.  This property value specifies that token.  You typically
+		 *  set this property to the AsyncToken object returned by the service.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function set token(t:AsyncToken):void
+		{
+			if (_token != null)
+			{
+				var resps:Array = _token.responders;
+				var ix:int = ArrayUtil.getItemIndex(this, resps);
+				if (ix != -1)
+					resps.splice(ix, 1);
+			}
+			if (t != null)
+				t.addResponder(this);
+			_token = t;
+		}
+		
+		public function get token():AsyncToken
+		{
+			return _token;
+		}
+		
+		/**
+		 *  This method is called by the AsyncToken when it wants to deliver a 
+		 *  <code>ResultEvent</code> to the CallResponder.  You do not call
+		 *  this method directly.
+		 *
+		 *  @param data The ResultEvent delivered by the AsyncToken
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function result(data:Object):void
+		{
+			var resultEvent:ResultEvent = ResultEvent(data);
+			lastResult = resultEvent.result;
+			
+			dispatchEvent(resultEvent);
+		}
+		
+		/**
+		 *  This method is called by the AsyncToken when it wants to deliver a 
+		 *  <code>FaultEvent</code> to the CallResponder.  You do not call
+		 *  this method directly.
+		 *
+		 *  @param data The FaultEvent delivered by the AsyncToken
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function fault(data:Object):void
+		{
+			var faultEvent:FaultEvent = FaultEvent(data);
+			
+			// Not clearing lastResult here... this will allow developers to keep using
+			// lastResult even in the event of a fault.
+			dispatchEvent(faultEvent);
+		}
+		
+		[Bindable]
+		/**
+		 *  This property stores the result property of the token each time it
+		 *  delivers a successful result.  You can bind to or access this property 
+		 *  instead of the token.result property to keep your code from seeing that
+		 *  value cleared out on the second and subsequent call to a particular service
+		 *  method.  Additionally, if a fault occurs this value will still be set to
+		 *  the last successful result returned by a token monitored by this CallResponder.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public var lastResult:*;
+		
+	}
+	
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/HTTPService.as b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/HTTPService.as
index dbabec580..ccb6f6df8 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/HTTPService.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/HTTPService.as
@@ -19,291 +19,999 @@
 
 package mx.rpc.http
 {
-
-import mx.core.mx_internal;
-import mx.rpc.AsyncToken;
-import mx.rpc.events.ResultEvent;
-
-import org.apache.royale.events.Event;
-import org.apache.royale.events.EventDispatcher;
-import org.apache.royale.net.HTTPService;
-
-
-//import mx.utils.URLUtil;
-
-// namespace mx_internal;
-
-/**
- *  Dispatched when an HTTPService call returns successfully.
- * @eventType mx.rpc.events.ResultEvent.RESULT 
- *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Royale 0.9.3
- */
-[Event(name="result", type="mx.rpc.events.ResultEvent")]
-
-/**
- *  Dispatched when an HTTPService call fails.
- * @eventType mx.rpc.events.FaultEvent.FAULT 
- *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Royale 0.9.3
- */
-[Event(name="fault", type="mx.rpc.events.FaultEvent")]
-
-/**
- *  The invoke event is fired when an HTTPService call is invoked so long as
- *  an Error is not thrown before the Channel attempts to send the message.
- * @eventType mx.rpc.events.InvokeEvent.INVOKE 
- *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Royale 0.9.3
- */
-[Event(name="invoke", type="mx.rpc.events.InvokeEvent")]
-
-//[ResourceBundle("rpc")]
-
-/**
-  *  You use the HTTPService class to represent an
-  *  HTTPService object in ActionScript. When you call the HTTPService object's
-  *  <code>send()</code> method, it makes an HTTP request to the
-  *  specified URL, and an HTTP response is returned. Optionally, you can pass
-  *  parameters to the specified URL. When you do not go through the server-based
-  *  proxy service, you can use only HTTP GET or POST methods. However, when you set
-  *  the useProxy  property to true and you use the server-based proxy service, you
-  *  can also use the HTTP HEAD, OPTIONS, TRACE, and DELETE methods.
-  *
-  *  <p><b>Note:</b> Due to a software limitation, HTTPService does not generate user-friendly
-  *  error messages when using GET.</p>
-  * 
-  *  @see mx.rpc.http.mxml.HTTPService
-  *
-  *  @langversion 3.0
-  *  @playerversion Flash 9
-  *  @playerversion AIR 1.1
-  *  @productversion Royale 0.9.3
- */
-public class HTTPService extends EventDispatcher
-{
-    //--------------------------------------------------------------------------
-    //
-    // Constructor
-    // 
-    //--------------------------------------------------------------------------
-    
-    /**
-     *  Creates a new HTTPService. If you expect the service to send using relative URLs you may
-     *  wish to specify the <code>rootURL</code> that will be the basis for determining the full URL (one example
-     *  would be <code>Application.application.url</code>).
-     *
-     * @param rootURL The URL the HTTPService should use when computing relative URLS.
-     *
-     * @param destination An HTTPService destination name in the service-config.xml file.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Royale 0.9.3
-     */
-    public function HTTPService(rootURL:String = null, destination:String = null)
-    {
-        super(); 
-    }
-
-    private var royale:org.apache.royale.net.HTTPService = new org.apache.royale.net.HTTPService();
-    
-    //--------------------------------------------------------------------------
-    //
-    // Constants
-    // 
-    //--------------------------------------------------------------------------
-      
+	
+	import mx.core.mx_internal;
+	import mx.messaging.ChannelSet;
+	import mx.messaging.config.LoaderConfig;
+	import mx.messaging.events.MessageEvent;
+	import mx.messaging.messages.IMessage;
+	import mx.rpc.AbstractInvoker;
+	import mx.rpc.AsyncRequest;
+	import mx.rpc.AsyncToken;
+	import mx.utils.URLUtil;
+	
+	use namespace mx_internal;
+	
 	/**
-	 *  Indicates that the HTTPService object uses the DefaultHTTP destination.
+	 *  Dispatched when an HTTPService call returns successfully.
+	 * @eventType mx.rpc.events.ResultEvent.RESULT 
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion Flash 9
 	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
+	 *  @productversion Royale 0.9.3
 	 */
-	public static const DEFAULT_DESTINATION_HTTP:String = "DefaultHTTP";
+	[Event(name="result", type="mx.rpc.events.ResultEvent")]
 	
 	/**
-	 *  Indicates that the HTTPService object uses the DefaultHTTPS destination.
+	 *  Dispatched when an HTTPService call fails.
+	 * @eventType mx.rpc.events.FaultEvent.FAULT 
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion Flash 9
 	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
+	 *  @productversion Royale 0.9.3
 	 */
-	public static const DEFAULT_DESTINATION_HTTPS:String = "DefaultHTTPS";
-
-    /**
-     * @private
-     * Propagate event listeners down to the operation since it is firing some of the
-     * events.
-    public function addEventListener(type:String, listener:Function,
-        useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
-    {
-       operation.addEventListener(type, listener, useCapture, priority, useWeakReference);
-        super.addEventListener(type, listener, useCapture, priority, useWeakReference);
-    } 
-*/
- 
+	[Event(name="fault", type="mx.rpc.events.FaultEvent")]
+	
+	/**
+	 *  The invoke event is fired when an HTTPService call is invoked so long as
+	 *  an Error is not thrown before the Channel attempts to send the message.
+	 * @eventType mx.rpc.events.InvokeEvent.INVOKE 
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	[Event(name="invoke", type="mx.rpc.events.InvokeEvent")]
+	
+	[ResourceBundle("rpc")]
+	
+	/**
+	 *  You use the HTTPService class to represent an
+	 *  HTTPService object in ActionScript. When you call the HTTPService object's
+	 *  <code>send()</code> method, it makes an HTTP request to the
+	 *  specified URL, and an HTTP response is returned. Optionally, you can pass
+	 *  parameters to the specified URL. When you do not go through the server-based
+	 *  proxy service, you can use only HTTP GET or POST methods. However, when you set
+	 *  the useProxy  property to true and you use the server-based proxy service, you
+	 *  can also use the HTTP HEAD, OPTIONS, TRACE, and DELETE methods.
+	 *
+	 *  <p><b>Note:</b> Due to a software limitation, HTTPService does not generate user-friendly
+	 *  error messages when using GET.</p>
+	 * 
+	 *  @see mx.rpc.http.mxml.HTTPService
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public class HTTPService extends AbstractInvoker
+	{
+		//--------------------------------------------------------------------------
+		//
+		// Constructor
+		// 
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  Creates a new HTTPService. If you expect the service to send using relative URLs you may
+		 *  wish to specify the <code>rootURL</code> that will be the basis for determining the full URL (one example
+		 *  would be <code>Application.application.url</code>).
+		 *
+		 * @param rootURL The URL the HTTPService should use when computing relative URLS.
+		 *
+		 * @param destination An HTTPService destination name in the service-config.xml file.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function HTTPService(rootURL:String = null, destination:String = null)
+		{
+			super();
+			
+			operation = new HTTPOperation(this);
+			
+			operation.makeObjectsBindable = true;
+			
+			operation._rootURL = rootURL;
+			
+			// If the SWF was loaded via HTTPS, we'll use the DefaultHTTPS destination by default
+			if (destination == null)
+			{
+				if (URLUtil.isHttpsURL(LoaderConfig.url))
+					asyncRequest.destination = DEFAULT_DESTINATION_HTTPS;
+				else
+					asyncRequest.destination = DEFAULT_DESTINATION_HTTP;
+			} 
+			else 
+			{
+				asyncRequest.destination = destination;
+				useProxy = true;
+			}
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		// Constants
+		// 
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  The result format "e4x" specifies that the value returned is an XML instance, which can be accessed using ECMAScript for XML (E4X) expressions.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const RESULT_FORMAT_E4X:String = "e4x";
+		
+		/**
+		 *  The result format "flashvars" specifies that the value returned is text containing name=value pairs
+		 *  separated by ampersands, which is parsed into an ActionScript object.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const RESULT_FORMAT_FLASHVARS:String = "flashvars";
+		
+		/**
+		 *  The result format "object" specifies that the value returned is XML but is parsed as a tree of ActionScript objects. This is the default.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const RESULT_FORMAT_OBJECT:String = "object";
+		
+		/**
+		 *  The result format "array" is similar to "object" however the value returned is always an Array such
+		 *  that if the result returned from result format "object" is not an Array already the item will be
+		 *  added as the first item to a new Array.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const RESULT_FORMAT_ARRAY:String = "array";
+		
+		/**
+		 *  The result format "text" specifies that the HTTPService result text should be an unprocessed String.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const RESULT_FORMAT_TEXT:String = "text";
+		
+		/**
+		 *  The result format "xml" specifies that results should be returned as an flash.xml.XMLNode instance pointing to
+		 *  the first child of the parent flash.xml.XMLDocument.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const RESULT_FORMAT_XML:String = "xml";
+		
+		/**
+		 *  Indicates that the data being sent by the HTTP service is encoded as application/xml.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const CONTENT_TYPE_XML:String = "application/xml";
+		
+		/**
+		 *  Indicates that the data being sent by the HTTP service is encoded as application/x-www-form-urlencoded.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const CONTENT_TYPE_FORM:String = "application/x-www-form-urlencoded";
+		
+		/**
+		 *  Indicates that the HTTPService object uses the DefaultHTTP destination.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const DEFAULT_DESTINATION_HTTP:String = "DefaultHTTP";
+		
+		/**
+		 *  Indicates that the HTTPService object uses the DefaultHTTPS destination.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const DEFAULT_DESTINATION_HTTPS:String = "DefaultHTTPS";
+		
+		// Constants for error codes
+		/**
+		 *  Indicates that the useProxy property was set to false but a url was not provided.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const ERROR_URL_REQUIRED:String = "Client.URLRequired";
+		
+		/**
+		 *  Indicates that an XML formatted result could not be parsed into an XML instance
+		 *  or decoded into an Object.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const ERROR_DECODING:String = "Client.CouldNotDecode";
+		
+		/**
+		 *  Indicates that an input parameter could not be encoded as XML.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public static const ERROR_ENCODING:String = "Client.CouldNotEncode";    
+		
+		
+		/**
+		 * @private
+		 * Propagate event listeners down to the operation since it is firing some of the
+		 * events.
+		 */
+		/*override public function addEventListener(type:String, listener:Function,
+		useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
+		{
+		operation.addEventListener(type, listener, useCapture, priority, useWeakReference);
+		super.addEventListener(type, listener, useCapture, priority, useWeakReference);
+		}*/
+		
+		/**
+		 * @private
+		 * Remove event listener on operation added in the addEventListener override.
+		 */
+		/*override public function removeEventListener(type:String, listener:Function,
+		useCapture:Boolean = false):void
+		{
+		operation.removeEventListener(type, listener, useCapture);
+		super.removeEventListener(type, listener, useCapture);
+		}*/
+		
+		mx_internal var operation:AbstractOperation;
+		
+		override mx_internal function set asyncRequest(ar:AsyncRequest):void
+		{
+			operation.asyncRequest = ar;
+		}
+		override mx_internal function get asyncRequest():AsyncRequest
+		{
+			return operation.asyncRequest;
+		}
+		
+		//----------------------------------
+		//  channelSet
+		//----------------------------------
+		
+		/**
+		 *  Provides access to the ChannelSet used by the service. The
+		 *  ChannelSet can be manually constructed and assigned, or it will be 
+		 *  dynamically created to use the configured Channels for the
+		 *  <code>destination</code> for this service.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get channelSet():ChannelSet
+		{
+			return asyncRequest.channelSet;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function set channelSet(value:ChannelSet):void
+		{
+			useProxy = true;
+			asyncRequest.channelSet = value;
+		}
+		
+		//----------------------------------
+		//  contentType
+		//----------------------------------
+		
+		[Inspectable(enumeration="application/x-www-form-urlencoded,application/xml", defaultValue="application/x-www-form-urlencoded", category="General")]
+		/**
+		 *  Type of content for service requests. 
+		 *  The default is <code>application/x-www-form-urlencoded</code> which sends requests
+		 *  like a normal HTTP POST with name-value pairs. <code>application/xml</code> send
+		 *  requests as XML.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get contentType():String
+		{
+			return operation.contentType;
+		}
+		public function set contentType(c:String):void
+		{
+			operation.contentType = c;
+		}
+		
+		[Inspectable(enumeration="multiple,single,last", defaultValue="multiple", category="General")]
+		/**
+		 * Value that indicates how to handle multiple calls to the same service. The default
+		 * value is <code>multiple</code>. The following values are permitted:
+		 * <ul>
+		 * <li><code>multiple</code> Existing requests are not cancelled, and the developer is
+		 * responsible for ensuring the consistency of returned data by carefully
+		 * managing the event stream. This is the default value.</li>
+		 * <li><code>single</code> Only a single request at a time is allowed on the operation;
+		 * multiple requests generate a fault.</li>
+		 * <li><code>last</code> Making a request cancels any existing request.</li>
+		 * </ul>
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get concurrency():String
+		{
+			return operation.concurrency;
+		}
+		public function set concurrency(c:String):void
+		{
+			operation.concurrency = c;
+		}
+		
+		//----------------------------------
+		//  destination
+		//----------------------------------
+		
+		[Inspectable(defaultValue="DefaultHTTP", category="General")]
+		/**
+		 *  An HTTPService destination name in the services-config.xml file. When
+		 *  unspecified, Flex uses the <code>DefaultHTTP</code> destination.
+		 *  If you are using the <code>url</code> property, but want requests
+		 *  to reach the proxy over HTTPS, specify <code>DefaultHTTPS</code>.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get destination():String
+		{
+			return asyncRequest.destination;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function set destination(value:String):void
+		{
+			useProxy = true;
+			asyncRequest.destination = value;
+		}
+		
+		[Inspectable(defaultValue="true", category="General")]
+		/**
+		 * When this value is true, anonymous objects returned are forced to bindable objects.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		override public function get makeObjectsBindable():Boolean
+		{
+			return operation.makeObjectsBindable;
+		}
+		
+		override public function set makeObjectsBindable(b:Boolean):void
+		{
+			operation.makeObjectsBindable = b;
+		}
+		
+		//----------------------------------
+		//  headers
+		//----------------------------------
+		
+		[Inspectable(defaultValue="undefined", category="General")]
+		/**
+		 *  Custom HTTP headers to be sent to the third party endpoint. If multiple headers need to
+		 *  be sent with the same name the value should be specified as an Array.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get headers():Object
+		{
+			return operation.headers;
+		}
+		public function set headers(r:Object):void
+		{
+			operation.headers = r;
+		}
+		
+		//----------------------------------
+		//  method
+		//----------------------------------
+		
+		[Inspectable(enumeration="GET,get,POST,post,HEAD,head,OPTIONS,options,PUT,put,TRACE,trace,DELETE,delete", defaultValue="GET", category="General")]
+		/**
+		 *  HTTP method for sending the request. Permitted values are <code>GET</code>, <code>POST</code>, <code>HEAD</code>,
+		 *  <code>OPTIONS</code>, <code>PUT</code>, <code>TRACE</code> and <code>DELETE</code>.
+		 *  Lowercase letters are converted to uppercase letters. The default value is <code>GET</code>.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get method():String
+		{
+			return operation.method;
+		}
+		public function set method(m:String):void
+		{
+			operation.method = m;
+		}
+		
+		//----------------------------------
+		//  request
+		//----------------------------------
+		
+		[Inspectable(defaultValue="undefined", category="General")]
+		/**
+		 *  Object of name-value pairs used as parameters to the URL. If
+		 *  the <code>contentType</code> property is set to <code>application/xml</code>, it should be an XML document.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get request():Object
+		{
+			return operation.request;
+		}
+		public function set request(r:Object):void
+		{
+			operation.request = r;
+		}
+		
+		[Inspectable(enumeration="object,array,xml,flashvars,text,e4x", defaultValue="object", category="General")]
+		/**
+		 *  Value that indicates how you want to deserialize the result
+		 *  returned by the HTTP call. The value for this is based on the following:
+		 *  <ul>
+		 *  <li>Whether you are returning XML or name/value pairs.</li>
+		 *  <li>How you want to access the results; you can access results as an object,
+		 *    text, or XML.</li>
+		 *  </ul>
+		 * 
+		 *  <p>The default value is <code>object</code>. The following values are permitted:</p>
+		 *  <ul>
+		 *  <li><code>object</code> The value returned is XML and is parsed as a tree of ActionScript
+		 *    objects. This is the default.</li>
+		 *  <li><code>array</code> The value returned is XML and is parsed as a tree of ActionScript
+		 *    objects however if the top level object is not an Array, a new Array is created and the result
+		 *    set as the first item. If makeObjectsBindable is true then the Array 
+		 *    will be wrapped in an ArrayCollection.</li>
+		 *  <li><code>xml</code> The value returned is XML and is returned as literal XML in an
+		 *    ActionScript XMLnode object.</li>
+		 *  <li><code>flashvars</code> The value returned is text containing 
+		 *    name=value pairs separated by ampersands, which
+		 *  is parsed into an ActionScript object.</li>
+		 *  <li><code>text</code> The value returned is text, and is left raw.</li>
+		 *  <li><code>e4x</code> The value returned is XML and is returned as literal XML 
+		 *    in an ActionScript XML object, which can be accessed using ECMAScript for 
+		 *    XML (E4X) expressions.</li>
+		 *  </ul>
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get resultFormat():String
+		{
+			return operation.resultFormat;
+		}
+		public function set resultFormat(rf:String):void
+		{
+			operation.resultFormat = rf;
+		}
+		
+		//----------------------------------
+		//  rootURL
+		//----------------------------------
+		
+		/**
+		 *  The URL that the HTTPService object should use when computing relative URLs.
+		 *  This property is only used when going through the proxy.
+		 *  When the <code>useProxy</code> property is set to <code>false</code>, the relative URL is computed automatically
+		 *  based on the location of the SWF running this application.
+		 *  If not set explicitly <code>rootURL</code> is automatically set to the URL of
+		 *  mx.messaging.config.LoaderConfig.url.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get rootURL():String
+		{
+			return operation.rootURL;
+		}
+		public function set rootURL(ru:String):void
+		{
+			operation.rootURL = ru;
+		}
+		
+		//----------------------------------
+		//  showBusyCursor
+		//----------------------------------
+		
+		[Inspectable(defaultValue="false", category="General")]
+		/**
+		 * If <code>true</code>, a busy cursor is displayed while a service is executing. The default
+		 * value is <code>false</code>.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get showBusyCursor():Boolean
+		{
+			return operation.showBusyCursor;
+		}
+		
+		public function set showBusyCursor(sbc:Boolean):void
+		{
+			operation.showBusyCursor = sbc;
+		}
+		
+		//----------------------------------
+		//  serializationFilter 
+		//----------------------------------
+		
+		/**
+		 * Provides an adapter which controls the process of converting the HTTP response body into 
+		 * ActionScript objects and/or turning the parameters or body into the contentType, URL, and
+		 * and post body of the HTTP request.  This can also be set indirectly by setting the 
+		 * resultFormat by registering a SerializationFilter using the static method:
+		 * SerializationFilter.registerFilterForResultFormat("formatName", filter)
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get serializationFilter():SerializationFilter
+		{
+			return operation.serializationFilter;
+		}
+		public function set serializationFilter(s:SerializationFilter):void
+		{
+			operation.serializationFilter = s;
+		}
+		
+		[Inspectable(defaultValue="undefined", category="General")]
+		/**
+		 *  Location of the service. If you specify the <code>url</code> and a non-default destination,
+		 *  your destination in the services-config.xml file must allow the specified URL.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get url():String
+		{
+			return operation.url;
+		}
+		public function set url(u:String):void
+		{
+			operation.url = u;
+		}
+		
+		[Inspectable(defaultValue="false", category="General")]
+		/**
+		 *  Specifies whether to use the Flex proxy service. The default value is <code>false</code>. If you
+		 *  do not specify <code>true</code> to proxy requests though the Flex server, you must ensure that the player 
+		 *  can reach the target URL. You also cannot use destinations defined in the services-config.xml file if the
+		 *  <code>useProxy</code> property is set to <code>false</code>.
+		 *
+		 *  @default false    
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get useProxy():Boolean
+		{
+			return operation.useProxy;
+		}
+		public function set useProxy(u:Boolean):void
+		{
+			operation.useProxy = u;
+		}
+		
+		//----------------------------------
+		//  xmlDecode
+		//----------------------------------
+		
+		[Inspectable(defaultValue="undefined", category="General")]
+		/**
+		 *  ActionScript function used to decode a service result from XML.
+		 *  When the <code>resultFormat</code> is an object and the <code>xmlDecode</code> property is set,
+		 *  Flex uses the XML that the HTTPService returns to create an
+		 *  Object. If it is not defined the default XMLDecoder is used
+		 *  to do the work.
+		 *  <p>The function referenced by the <code>xmlDecode</code> property must
+		 *  take a flash.xml.XMLNode object as a parameter and should return
+		 *  an Object. It can return any type of object, but it must return
+		 *  something. Returning <code>null</code> or <code>undefined</code> causes a fault.</p>
+		 
+		 The following example shows an &lt;mx:HTTPService&gt; tag that specifies an xmlDecode function:
+		 
+		 <pre>
+		 &lt;mx:HTTPService id="hs" xmlDecode="xmlDecoder" url="myURL" resultFormat="object" contentType="application/xml"&gt;
+		 &lt;mx:request&gt;&lt;source/&gt;
+		 &lt;obj&gt;{RequestObject}&lt;/obj&gt;
+		 &lt;/mx:request&gt;
+		 &lt;/mx:HTTPService&gt;
+		 </pre>
+		 
+		 
+		 The following example shows an xmlDecoder function:
+		 <pre>
+		 function xmlDecoder (myXML)
+		 {
+		 // Simplified decoding logic.
+		 var myObj = {};
+		 myObj.name = myXML.firstChild.nodeValue;
+		 myObj.honorific = myXML.firstChild.attributes.honorific;
+		 return myObj;
+		 }
+		 </pre>
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get xmlDecode():Function
+		{
+			return operation.xmlDecode;
+		}
+		public function set xmlDecode(u:Function):void
+		{
+			operation.xmlDecode = u;
+		}
+		
+		//----------------------------------
+		//  xmlEncode
+		//----------------------------------
+		
+		[Inspectable(defaultValue="undefined", category="General")]
+		/**
+		 *  ActionScript function used to encode a service request as XML.
+		 *  When the <code>contentType</code> of a request is <code>application/xml</code> and the
+		 *  request object passed in is an Object, Flex attempts to use
+		 *  the function specified in the <code>xmlEncode</code> property to turn it
+		 *  into a flash.xml.XMLNode object If the <code>xmlEncode</code> property is not set, 
+		 *  Flex uses the default
+		 *  XMLEncoder to turn the object graph into a flash.xml.XMLNode object.
+		 * 
+		 *  <p>The <code>xmlEncode</code> property takes an Object and should return
+		 *  a flash.xml.XMLNode object. In this case, the XMLNode object can be a flash.xml.XML object,
+		 *  which is a subclass of XMLNode, or the first child of the
+		 *  flash.xml.XML object, which is what you get from an <code>&lt;mx:XML&gt;</code> tag.
+		 *  Returning the wrong type of object causes a fault.
+		 *  The following example shows an &lt;mx:HTTPService&gt; tag that specifies an xmlEncode function:</p>
+		 
+		 <pre>
+		 &lt;mx:HTTPService id="hs" xmlEncode="xmlEncoder" url="myURL" resultFormat="object" contentType="application/xml"&gt;
+		 &lt;mx:request&gt;&lt;source/&gt;
+		 &lt;obj&gt;{RequestObject}&lt;/obj&gt;
+		 &lt;/mx:request&gt;
+		 &lt;/mx:HTTPService&gt;
+		 </pre>
+		 
+		 
+		 The following example shows an xmlEncoder function:
+		 <pre>
+		 function xmlEncoder (myObj)
+		 {
+		 return new XML("<userencoded><attrib0>MyObj.test</attrib0>
+		 <attrib1>MyObj.anotherTest</attrib1></userencoded>");
+		 }
+		 </pre>
+		 
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get xmlEncode():Function
+		{
+			return operation.xmlEncode;
+		}
+		public function set xmlEncode(u:Function):void
+		{
+			operation.xmlEncode = u;
+		}
+		
+		[Bindable("resultForBinding")]
+		/**
+		 *  The result of the last invocation.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		override public function get lastResult():Object
+		{
+			return operation.lastResult;
+		}
+		
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		override public function clearResult(fireBindingEvent:Boolean = true):void
+		{
+			operation.clearResult(fireBindingEvent);
+		}
+		
+		//----------------------------------
+		//  requestTimeout
+		//----------------------------------
+		
+		[Inspectable(category="General")]
+		
+		/**
+		 *  Provides access to the request timeout in seconds for sent messages. 
+		 *  A value less than or equal to zero prevents request timeout.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */ 
+		public function get requestTimeout():int
+		{
+			return asyncRequest.requestTimeout;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function set requestTimeout(value:int):void
+		{
+			if (asyncRequest.requestTimeout != value)
+			{
+				asyncRequest.requestTimeout = value;
+				
+				// Propagate to operation instance.
+				if (operation)
+					operation.requestTimeout = value;
+			}
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		// Methods
+		// 
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  Logs the user out of the destination. 
+		 *  Logging out of a destination applies to everything connected using the same channel
+		 *  as specified in the server configuration. For example, if you're connected over the my-rtmp channel
+		 *  and you log out using one of your RPC components, anything that was connected over my-rtmp is logged out.
+		 *
+		 *  <p><b>Note:</b> Adobe recommends that you use the mx.messaging.ChannelSet.logout() method
+		 *  rather than this method. </p>
+		 *
+		 *  @see mx.messaging.ChannelSet#logout()   
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function logout():void
+		{
+			asyncRequest.logout();
+		}
+		
+		/**
+		 *  Executes an HTTPService request. The parameters are optional, but if specified should
+		 *  be an Object containing name-value pairs or an XML object depending on the <code>contentType</code>.
+		 *
+		 *  @param parameters An Object containing name-value pairs or an
+		 *  XML object, depending on the content type for service
+		 *  requests.
+		 * 
+		 *  @return An object representing the asynchronous completion token. It is the same object
+		 *  available in the <code>result</code> or <code>fault</code> event's <code>token</code> property.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function send(parameters:Object = null):AsyncToken
+		{
+			if (parameters == null)
+				parameters = request;
+			
+			return operation.sendBody(parameters);
+		}
+		
+		/**
+		 *  Disconnects the service's network connection.
+		 *  This method does not wait for outstanding network operations to complete.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function disconnect():void
+		{
+			asyncRequest.disconnect();
+		}
+		
+		/**
+		 *  Sets the credentials for the destination accessed by the service.
+		 *  The credentials are applied to all services connected over the same ChannelSet.
+		 *  Note that services that use a proxy to a remote destination
+		 *  will need to call the <code>setRemoteCredentials()</code> method instead.
+		 * 
+		 *  @param username the username for the destination.
+		 *  @param password the password for the destination.
+		 *  @param charset The character set encoding to use while encoding the
+		 *  credentials. The default is null, which implies the legacy charset of
+		 *  ISO-Latin-1. The only other supported charset is &quot;UTF-8&quot;.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function setCredentials(username:String, password:String, charset:String=null):void
+		{
+			asyncRequest.setCredentials(username, password, charset);
+		}
+		
+		/**
+		 *  The username and password to authenticate a user when accessing
+		 *  the HTTP URL. These are passed as part of the HTTP Authorization
+		 *  header from the proxy to the endpoint. If the <code>useProxy</code> property
+		 *  is set to is false, this property is ignored.
+		 *     
+		 *  @param remoteUsername the username to pass to the remote endpoint.
+		 *  @param remotePassword the password to pass to the remote endpoint.
+		 *  @param charset The character set encoding to use while encoding the
+		 *  remote credentials. The default is null, which implies the legacy
+		 *  charset of ISO-Latin-1. The only other supported charset is
+		 *  &quot;UTF-8&quot;.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */ 
+		public function setRemoteCredentials(remoteUsername:String, 
+											 remotePassword:String,
+											 charset:String=null):void
+		{
+			asyncRequest.setRemoteCredentials(remoteUsername, remotePassword, charset);
+		}
+		
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		override public function cancel(id:String = null):AsyncToken
+		{
+			return operation.cancel(id);
+		}
+		
+	}
+}
 
-    /**
-     *  @private
-     */
-    private var _resultFormat:String ;
+import mx.core.mx_internal;
 
-    [Inspectable(enumeration="object,array,xml,flashvars,text,e4x", category="General")]
-    /**
-     *  Value that indicates how you want to deserialize the result
-     *  returned by the HTTP call. The value for this is based on the following:
-     *  <ul>
-     *  <li>Whether you are returning XML or name/value pairs.</li>
-     *  <li>How you want to access the results; you can access results as an object,
-     *    text, or XML.</li>
-     *  </ul>
-     * 
-     *  <p>The default value is <code>object</code>. The following values are permitted:</p>
-     *  <ul>
-     *  <li><code>object</code> The value returned is XML and is parsed as a tree of ActionScript
-     *    objects. This is the default.</li>
-     *  <li><code>array</code> The value returned is XML and is parsed as a tree of ActionScript
-     *    objects however if the top level object is not an Array, a new Array is created and the result
-     *    set as the first item. If makeObjectsBindable is true then the Array 
-     *    will be wrapped in an ArrayCollection.</li>
-     *  <li><code>xml</code> The value returned is XML and is returned as literal XML in an
-     *    ActionScript XMLnode object.</li>
-     *  <li><code>flashvars</code> The value returned is text containing 
-     *    name=value pairs separated by ampersands, which
-     *  is parsed into an ActionScript object.</li>
-     *  <li><code>text</code> The value returned is text, and is left raw.</li>
-     *  <li><code>e4x</code> The value returned is XML and is returned as literal XML 
-     *    in an ActionScript XML object, which can be accessed using ECMAScript for 
-     *    XML (E4X) expressions.</li>
-     *  </ul>
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function get resultFormat():String
-    {
-        return _resultFormat;
-    }
+import mx.rpc.events.AbstractEvent;
+import mx.rpc.http.AbstractOperation;
+import mx.rpc.http.HTTPService;
 
-    /**
-     *  @private
-     */
-    public function set resultFormat(value:String):void
-    {
-         
-          if (value != null)  
-            { 
-               _resultFormat = value;
-		   }
-    }
+/**
+ *  @private
+ *  
+ *  An HTTPService specific override that allow service level event listeners 
+ *  to handle RPC events.
+ */
+class HTTPOperation extends AbstractOperation 
+{
+	public function HTTPOperation(httpService:HTTPService, name:String=null)
+	{
+		super(null, name);
+		this.httpService = httpService;        
+	}
 	
-    [Inspectable(defaultValue="false", category="General")]
-    /**
-     *  Specifies whether to use the Flex proxy service. The default value is <code>false</code>. If you
-     *  do not specify <code>true</code> to proxy requests though the Flex server, you must ensure that the player 
-     *  can reach the target URL. You also cannot use destinations defined in the services-config.xml file if the
-     *  <code>useProxy</code> property is set to <code>false</code>.
-     *
-     *  @default false    
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function get useProxy():Boolean
-    {
-        return false; // operation.useProxy;
-    }
-    public function set useProxy(u:Boolean):void
-    {
-        //operation.useProxy = u;
-    }
-    
-    [Inspectable(defaultValue="undefined", category="General")]
-    /**
-     *  Location of the service. If you specify the <code>url</code> and a non-default destination,
-     *  your destination in the services-config.xml file must allow the specified URL.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Royale 0.9.3
-     */
-   //----------------------------------
-    //  url
-    //----------------------------------
-
-    [Inspectable(defaultValue="undefined", category="General")]
-    /**
-     *  Location of the service. If you specify the <code>url</code> and a non-default destination,
-     *  your destination in the services-config.xml file must allow the specified URL.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function get url():String
-    {
-        return royale.url;
-    }
-
-    /**
-     *  @private
-     */
-    public function set url(value:String):void
-    {
-        royale.url = value;
-    }
-      
-    /**
-     *  Executes an HTTPService request. The parameters are optional, but if specified should
-     *  be an Object containing name-value pairs or an XML object depending on the <code>contentType</code>.
-     *
-     *  @param parameters An Object containing name-value pairs or an
-     *  XML object, depending on the content type for service
-     *  requests.
-     * 
-     *  @return An object representing the asynchronous completion token. It is the same object
-     *  available in the <code>result</code> or <code>fault</code> event's <code>token</code> property.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Royale 0.9.3
-     */
-    public function send(parameters:Object = null):AsyncToken
-    {
-        /*if (parameters == null)
-            parameters = request;*/
-        royale.addEventListener("complete", completeHandler);
-        royale.send();
-        
-        return null ; //operation.sendBody(parameters);
-    }
-    
-    private function completeHandler(event:Event):void
-    {
-        dispatchEvent(new ResultEvent("result", false, false, royale.data));
-    }
-  }
+	/**
+	 *  @private
+	 */ 
+	override mx_internal function dispatchRpcEvent(event:AbstractEvent):void
+	{
+		if (hasEventListener(event.type))
+		{
+			event.mx_internal::callTokenResponders();
+			if (!event.isDefaultPrevented())
+				dispatchEvent(event);
+		}
+		else
+		{
+			if (httpService != null)
+				httpService.mx_internal::dispatchRpcEvent(event);
+			else
+				event.mx_internal::callTokenResponders();
+		}            
+	}
+	
+	/**
+	 *  @private
+	 */ 
+	private var httpService:HTTPService; 
 }
 
-
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/Operation.as b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/Operation.as
new file mode 100644
index 000000000..ae4531b2a
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/Operation.as
@@ -0,0 +1,455 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.rpc.http
+{
+
+import mx.core.mx_internal;
+import mx.logging.ILogger;
+import mx.logging.Log;
+import mx.rpc.AbstractService;
+import mx.rpc.AsyncRequest;
+import mx.rpc.AsyncToken;
+import mx.utils.URLUtil;
+
+import mx.messaging.errors.ArgumentError;
+	
+use namespace mx_internal;
+
+/**
+ * An Operation used specifically by an HTTPMultiService.  An Operation is an 
+ * individual operation on a service usually corresponding to a single operation on the server
+ * side.  An Operation can be called either by invoking the
+ * function of the same name on the service or by accessing the Operation as a property on the service and
+ * calling the <code>send(param1, param2)</code> method.  HTTP services also support a sendBody
+ * method which allows you to directly specify the body of the HTTP response.  If you use the
+ * send(param1, param2) method, the body is typically formed by combining the argumentNames
+ * property of the operation with the parameters sent.  An Object is created which uses the
+ * argumentNames[i] as the key and the corresponding parameter as the value.
+ * 
+ * <p>The exact way in which the HTTP operation arguments is put into the HTTP body is determined
+ * by the serializationFilter used.</p>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class Operation extends AbstractOperation
+{
+    //---------------------------------
+    // Constructor
+    //---------------------------------
+
+    /**
+     *  Creates a new Operation. 
+     *
+     *  @param service The HTTPMultiService object defining the service.
+     *
+     *  @param name The name of the service.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+
+     *  Creates a new Operation. 
+     *
+     *  @param service The HTTPMultiService object defining the service.
+     *
+     *  @param name The name of the service.
+     */
+    public function Operation(service:HTTPMultiService = null, name:String = null)
+    {
+        super(service, name);
+
+        // Set this to false even if the super constructor initialized concurrency to the default.
+        _concurrencySet = false;
+
+        _multiService = service;
+
+        _log = Log.getLogger("mx.rpc.http.HTTPMultiService");
+    }
+    
+    /**
+     * Stores the parent service which controls this operation.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    private var _multiService:HTTPMultiService;
+
+
+    /**
+     * @private
+     */
+    private var _concurrency:String;
+    /**
+     * @private
+     */
+    private var _concurrencySet:Boolean;
+
+    [Inspectable(enumeration="multiple,single,last", defaultValue="multiple", category="General")]
+    /**
+     * Value that indicates how to handle multiple calls to the same service operation. The default
+     * value is <code>multiple</code>. The following values are permitted:
+     * <ul>
+     * <li><code>multiple</code> Existing requests are not cancelled, and the developer is
+     * responsible for ensuring the consistency of returned data by carefully
+     * managing the event stream. This is the default value.</li>
+     * <li><code>single</code> Only a single request at a time is allowed on the operation;
+     * multiple requests generate a fault.</li>
+     * <li><code>last</code> Making a request cancels any existing request.</li>
+     * </ul>
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function get concurrency():String
+    {
+        // This override is necessary because unlike the old-style HttpService HttpOperation setup
+        // each HttpMultiService can have many http.Operations and concurrency settings don't have
+        // to be the same for the service and all its operations. If concurrency is not set on this
+        // operation, the setting from HttpMultiService is used. This code cannot be in AbstractOperation
+        // because the old HttpService doesn't hold a value for concurrency (and doesn't need to). It
+        // simply gets/sets concurrency for its only operation.
+        if (_concurrencySet)
+        {
+            return _concurrency;
+        }
+        //else
+        return _multiService.concurrency;
+    }
+    override public function set concurrency(c:String):void
+    {
+        _concurrency = c;
+        _concurrencySet = true;
+    }
+
+
+    /**
+     * Keep track of whether or not this has been set explicitly on the
+     * operation.  If not, we'll inherit this value from the service level.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    private var _makeObjectsBindableSet:Boolean;
+
+    [Inspectable(defaultValue="true", category="General")]
+    /**
+     * When this value is true, anonymous objects returned are forced to bindable objects.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function get makeObjectsBindable():Boolean
+    {
+        if (_makeObjectsBindableSet)
+            return _makeObjectsBindable;
+        return _multiService.makeObjectsBindable;    
+    }
+
+    override public function set makeObjectsBindable(b:Boolean):void
+    {
+        _makeObjectsBindable = b;
+        _makeObjectsBindableSet = true;
+    }
+
+    private var _methodSet:Boolean = false;
+    private var _method:String;
+
+    /**
+     *  @inheritDoc
+     */
+    override public function get method():String
+    {
+        if (_methodSet)
+            return _method;
+
+        return _multiService.method;
+    }
+    /**
+     *  @private
+     */
+    override public function set method(m:String):void
+    {
+        _method = m;
+        _methodSet = m != null;
+    }
+
+    override mx_internal function setService(s:AbstractService):void
+    {
+        super.setService(s);
+        if (s is HTTPMultiService)
+            _multiService = s as HTTPMultiService;
+
+    }
+
+    private var _showBusyCursorSet:Boolean = false;
+    /**
+     *  @inheritDoc
+     */
+    override public function get showBusyCursor():Boolean
+    {
+        if (_showBusyCursorSet)
+            return super.showBusyCursor;
+        return _multiService.showBusyCursor;    
+    }
+    /**
+     *  @private
+     */
+    override public function set showBusyCursor(b:Boolean):void
+    {
+        super.showBusyCursor = b;
+        _showBusyCursorSet = true;
+    }
+
+    /**
+     * The rootURL is used to compute the URL for an HTTP service operation when the
+     * a relative URL is specified for the operation.  The directory name of the
+     * rootURL is prepended to any relative URLs for the operation.  It is typically
+     * more convenient to set the baseURL since baseURL specifies the directory name
+     * directly whereas rootURL specifies the name of a file whose directory name is
+     * prepended.  If neither rootURL nor baseURL are set explicitly, the directory name
+     * of the .swf file is prepended to relative paths.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function get rootURL():String
+    {
+        if (_rootURL == null)
+        {
+            var useRootURL:String = _multiService.baseURL;
+            if (useRootURL != null && useRootURL.length > 0)
+            {
+                if (useRootURL.charAt(useRootURL.length - 1) != '/')
+                    useRootURL = useRootURL + "/";
+
+                // If this is relative to the 
+                if (useRootURL.charAt(0) == "/")
+                    useRootURL = URLUtil.getFullURL(super.rootURL, useRootURL);
+                return useRootURL;
+            }
+            else
+                return super.rootURL; // defaults to SWF's URL
+        }
+        return _rootURL;
+    }
+
+    private var _useProxySet:Boolean = false;
+
+    /**
+     *  @inheritDoc
+     */
+    override public function get useProxy():Boolean
+    {
+        if (_useProxySet)
+            return super.useProxy;
+        return _multiService.useProxy;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set useProxy(value:Boolean):void
+    {
+        _useProxySet = true;
+        super.useProxy = value;
+    }
+
+    private var _contentTypeSet:Boolean = false;
+
+    /**
+     *  @inheritDoc
+     */
+    override public function get contentType():String
+    {
+        if (_contentTypeSet)
+            return super.contentType;
+        return _multiService.contentType;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set contentType(ct:String):void
+    {
+        _contentTypeSet = ct != null;
+        super.contentType = ct;
+    }
+
+    //---------------------------------
+    // Methods
+    //---------------------------------
+
+    /**
+     * Executes the http operation. Any arguments passed in are passed along as part of
+     * the operation call. If there are no arguments passed, the arguments property of
+     * class is used as the source of parameters.  HTTP operations commonly take named
+     * parameters, not positional parameters.  To supply the names for these parameters,
+     * you can also set the argumentNames property to an array of the property names.
+     *
+     * @param args Optional arguments passed in as part of the method call. If there
+     * are no arguments passed, the arguments object is used as the source of 
+     * parameters.
+     *
+     * @return AsyncToken Call using the asynchronous completion token pattern.
+     * The same object is available in the <code>result</code> and
+     * <code>fault</code> events from the <code>token</code> property.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function send(... args:Array):AsyncToken
+    {
+        if (_multiService != null)
+            _multiService.initialize();
+
+        if (operationManager != null)
+            return operationManager(args);
+
+        var params:Object; 
+
+        var filter:SerializationFilter = getSerializationFilter();
+        if (filter != null)
+        {
+            params = filter.serializeParameters(this, args);
+        }
+        else
+        {
+            params = args;
+            if (!params || (params.length == 0 && this.request))
+            {
+                params = this.request;
+            }
+
+            if (params is Array && argumentNames != null)
+            {
+                args = params as Array;
+				params = new Object();
+                if (args.length != argumentNames.length)
+                {
+                    throw new ArgumentError("HTTPMultiService operation called with " + argumentNames.length + " argumentNames and " + args.length + " number of parameters.  When argumentNames is specified, it must match the number of arguments passed to the invocation");
+                }
+                else
+                {
+                    // Special case for XML content type when only one parameter is provided.
+                    // This gets rid of the need for a serializationFilter for this simple case.
+                    // If there is more than one parameter though, we do not have a reliable way
+                    // to turn the arguments into a body.
+                    if (argumentNames.length == 1 && contentType == CONTENT_TYPE_XML)
+                    {
+                        params = args[0];
+                    }
+                    else
+                    {
+                        for (var i:int = 0; i < argumentNames.length; i++)
+                            params[argumentNames[i]] = args[i];
+                    }
+                }
+            }
+            // Also do the XML content type special case when no argument names is set
+            else if (args.length == 1) 
+            {
+                params = args[0];
+            }
+            else if (args.length != 0)
+            {
+                throw new ArgumentError("HTTPMultiService - you must set argumentNames to an array of parameter names if you use more than one parameter.");
+            }
+        }
+        return sendBody(params);
+    }
+
+    private var _resultFormatSet:Boolean = false;
+
+    /**
+     *  @inheritDoc
+     */
+    override public function get resultFormat():String
+    {
+        if (_resultFormatSet)
+            return super.resultFormat;
+        return _multiService.resultFormat;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set resultFormat(rf:String):void
+    {
+        _resultFormatSet = rf != null;
+        super.resultFormat = rf;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function getSerializationFilter():SerializationFilter
+    {
+        var sf:SerializationFilter = serializationFilter;
+        if (sf == null)
+            return _multiService.serializationFilter;
+        return sf;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function getHeaders():Object
+    {
+        // TODO: support combining the headers maps if both are specified
+        if (headers != null)
+            return headers;
+        else 
+            return _multiService.headers;
+    }
+
+    /**
+     * Use the asyncRequest from the parent service
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override mx_internal function get asyncRequest():AsyncRequest
+    {
+        // TODO: is this safe?  should we do this in RemoteObject etc. Minimally we
+        // need to propagate the multiService.destination to the AsyncRequest if we
+        // go with the default implementation of per-operation asyncRequest instances.
+        return _multiService.asyncRequest;
+    }
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/mxml/HTTPService.as b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/mxml/HTTPService.as
index 895259e1a..e4bf185ff 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/mxml/HTTPService.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/http/mxml/HTTPService.as
@@ -150,14 +150,14 @@ public class HTTPService extends mx.rpc.http.HTTPService //implements IMXMLSuppo
      *  @playerversion AIR 1.1
      *  @productversion Royale 0.9.3
      */
-    public function get method():String
+    /*public function get method():String
     {
         return _method;
     }
     public function set method(m:String):void
     {
         _method = m;
-    } 
+    }*/ 
     //----------------------------------
     //  showBusyCursor
     //----------------------------------
@@ -172,7 +172,7 @@ public class HTTPService extends mx.rpc.http.HTTPService //implements IMXMLSuppo
      *  @playerversion AIR 1.1
      *  @productversion Royale 0.9.3
     */
-    public function get showBusyCursor():Boolean
+    /*public function get showBusyCursor():Boolean
     {
         return _showBusyCursor;
     }
@@ -180,7 +180,7 @@ public class HTTPService extends mx.rpc.http.HTTPService //implements IMXMLSuppo
     public function set showBusyCursor(sbc:Boolean):void
     {
         _showBusyCursor = sbc;
-    } 
+    }*/ 
     
 }
 
diff --git a/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml b/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml
index 8d9e22923..296b22791 100644
--- a/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml
+++ b/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml
@@ -94,5 +94,12 @@
     <component id="TextLayoutFormat" class="org.apache.royale.textLayout.formats.TextLayoutFormat" lookupOnly="true"/>
     
     <component id="Form" class="spark.components.Form"/>
+	<component id="FormItem" class="spark.components.FormItem"/>
+	<component id="Spacer" class="mx.controls.Spacer" lookupOnly="true"/>
+	<component id="CallResponder" class="mx.rpc.CallResponder" lookupOnly="true"/>
+	<component id="DataGrid" class="spark.components.DataGrid"/>
+	<component id="GridColumn" class="spark.components.gridClasses.GridColumn"/>
+	<component id="ArrayList" class="mx.collections.ArrayList" lookupOnly="true"/>
+	<component id="HTTPService" class="mx.rpc.http.mxml.HTTPService" lookupOnly="true"/>
     
 </componentPackage>
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as b/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
index 920e18af5..9e5a6b895 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
@@ -68,6 +68,7 @@ internal class SparkRoyaleClasses
 	import spark.components.Grid; Grid;
 	import spark.components.DataGrid; DataGrid;
 	import spark.components.Form; Form;
+	import spark.components.FormItem; FormItem;
 	import spark.core.IDisplayText; IDisplayText;
 	
 }
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/FormItem.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/FormItem.as
new file mode 100644
index 000000000..9a69239be
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/FormItem.as
@@ -0,0 +1,541 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.components
+{
+	/*import flash.events.Event;*/
+	import org.apache.royale.events.Event;
+	
+	import mx.core.IVisualElement;
+	import mx.core.UIComponent;
+	import mx.core.mx_internal;
+	
+	import spark.core.IDisplayText;
+	
+	use namespace mx_internal;
+	
+	/**
+	 *  Specifies the image source to use for the required indicator. 
+	 *
+	 *  The default value is "assets/RequiredIndicator.png".
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	[Style(name="requiredIndicatorSource", type="Object", inherit="no")]
+	
+	/**
+	 *  Specifies the image source to use for the error indicator. 
+	 *
+	 *  The default value is "assets/ErrorIndicator.png".
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	[Style(name="errorIndicatorSource", type="Object", inherit="no")]
+	
+	/**
+	 *  The FormItem container defines the following in a Spark From:
+	 *
+	 *  <ul>
+	 *    <li>A single label.</li>
+	 *    <li>A sequence label.</li>
+	 *    <li>One or more child controls or containers.</li>
+	 *    <li>Help content that provides a description of the form item 
+	 *      or instructions for filling it in.</li>
+	 *    <li>Required indicator to indicate if a form item has to be filled</li>
+	 *  </ul>
+	 *
+	 *  Children can be controls or other containers.
+	 *  A single Form container can hold multiple FormItem containers.
+	 *  By default, all the FormItem elements are arranged in a horizontal 
+	 *  layout with the label placed on the left and the Help content on the right.
+	 *
+	 *  @mxml
+	 *
+	 *  <p>The <code>&lt;s:FormItem&gt;</code> tag inherits all the tag 
+	 *  attributes of its superclass and adds no new tag attributes:</p>
+	 *
+	 *  <pre>
+	 *  &lt;s:FormItem
+	 *    <strong>Properties</strong>
+	 *    helpContent="null"
+	 *    label=""
+	 *    required="false"
+	 *    sequenceLabel=""
+	 *  
+	 *    <strong>Common Styles</strong>
+	 *    errorIndicatorSource="assets/ErrorIndicator.png"
+	 *    requiredIndicatorSource="assets/RequiredIndicator.png"
+	 * 
+	 *    <strong>Mobile Styles</strong>
+	 *    leading="2"
+	 *    letterSpacing="0"
+	 *  /&gt;
+	 *  </pre>
+	 * 
+	 *  @see spark.components.Form
+	 *  @see spark.components.FormHeading
+	 *  @see spark.layouts.FormLayout
+	 *  @see spark.skins.spark.FormItemSkin
+	 *
+	 *  @includeExample examples/FormItemExample.mxml
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5 
+	 */
+	public class FormItem extends SkinnableContainer
+	{
+		// include "../core/Version.as";
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  Constructor.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function FormItem()
+		{
+			super();
+			// Set these here instead of in the CSS type selector for Form
+			// We want to hide the fact that the Form itself doesn't show
+			// the error skin or error tip, but that its children do. 
+			setStyle("showErrorSkin", false);
+			setStyle("showErrorTip", false);
+			
+			/*showInAutomationHierarchy = false;*/
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Skin Parts
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *   A reference to the visual element that displays this FormItem's label.
+		 */
+		[SkinPart(required="false")]
+		public var labelDisplay:IDisplayText;
+		
+		/**
+		 *  A reference to the visual element that displays the FormItem's sequenceLabel.
+		 */
+		[SkinPart(required="false")]
+		public var sequenceLabelDisplay:IDisplayText;
+		
+		/**
+		 *  A reference to the Group that contains the FormItem's helpContentGroup.
+		 */
+		[SkinPart(required="false")]
+		public var helpContentGroup:Group;
+		
+		/**
+		 *  A reference to the visual element that display the FormItem's error strings.
+		 */
+		[SkinPart(required="false")]
+		public var errorTextDisplay:IDisplayText;
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Properties 
+		//
+		//--------------------------------------------------------------------------
+		
+		mx_internal var _elementErrorStrings:Vector.<String> = new Vector.<String>;
+		
+		/**
+		 *  Each Vector item contains the error string from a content element. 
+		 *  If none of the content elements are invalid, then the vector 
+		 *  is empty. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */     
+		[Bindable(event="elementErrorStringsChanged")]
+		
+		public function get elementErrorStrings():Vector.<String>
+		{
+			return _elementErrorStrings;
+		}
+		
+		//----------------------------------
+		//  helpContent
+		//----------------------------------
+		
+		private var _helpContent:Array;
+		private var helpContentChanged:Boolean = false;
+		
+		[ArrayElementType("mx.core.IVisualElement")]
+		[Bindable("helpContentChanged")]
+		[Inspectable(category="General", arrayType="mx.core.IVisualElement", defaultValue="")]
+		
+		/** 
+		 *  The set of components to include in the help content 
+		 *  area of the FormItem.
+		 * 
+		 *  @default null
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function get helpContent():Array
+		{
+			if (helpContentGroup)
+				return helpContentGroup.getMXMLContent();
+			else
+				return _helpContent;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function set helpContent(value:Array):void
+		{
+			_helpContent = value;
+			helpContentChanged = true;
+			invalidateProperties();
+		}
+		
+		//----------------------------------
+		//  label
+		//----------------------------------
+		
+		private var _label:String = "";
+		
+		[Bindable("labelChanged")]
+		[Inspectable(category="General", defaultValue="")]
+		
+		/**
+		 *  Text label for the FormItem.
+		 *  For example, a FormItem used to input an 
+		 *  address might have the label of "Address".
+		 * 
+		 *  @default ""
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function get label():String
+		{
+			return _label;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function set label(value:String):void
+		{
+			if (_label == value)
+				return;
+			
+			_label = value;
+			
+			if (labelDisplay)
+				labelDisplay.text = label;
+				dispatchEvent(new Event("labelChanged"));
+		}
+		
+		//----------------------------------
+		//  required
+		//----------------------------------
+		
+		private var _required:Boolean = false;
+		
+		[Bindable("requiredChanged")]
+		[Inspectable(category="General", defaultValue="false")]
+		
+		/**
+		 *  If <code>true</code>, puts the FormItem skin into the
+		 *  <code>required</code> state. By default, this state displays 
+		 *  an indicator that the FormItem children require user input.
+		 *  If <code>false</code>, the indicator is not displayed.
+		 *
+		 *  <p>This property controls skin's state only.
+		 *  You must assign a validator to the child 
+		 *  if you require input validation.</p>
+		 *
+		 *  @default false
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function get required():Boolean
+		{
+			return _required;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function set required(value:Boolean):void
+		{
+			if (value == _required)
+				return;
+			
+			_required = value;
+			invalidateSkinState();
+		}
+		
+		//----------------------------------
+		//  sequenceLabel
+		//----------------------------------
+		
+		private var _sequenceLabel:String = "";
+		
+		[Bindable("sequenceLabelChanged")]
+		[Inspectable(category="General", defaultValue="")]
+		
+		/**
+		 *  The number of the form item in the form. 
+		 * 
+		 *  @default ""
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function get sequenceLabel():String
+		{
+			return _sequenceLabel;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function set sequenceLabel(value:String):void
+		{
+			if (_sequenceLabel == value)
+				return;
+			
+			_sequenceLabel = value;
+			
+			if (sequenceLabelDisplay)
+				sequenceLabelDisplay.text = sequenceLabel;
+			dispatchEvent(new Event("sequenceLabelChanged"));
+			
+			invalidateProperties();
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden Properties
+		//
+		//--------------------------------------------------------------------------
+		
+		//----------------------------------
+		//  baselinePosition
+		//----------------------------------
+		
+		/**
+		 *  @private
+		 */
+		override public function get baselinePosition():Number
+		{
+			return 0; /*getBaselinePositionForPart(labelDisplay as IVisualElement);*/
+		}     
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden Methods
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @private
+		 */
+		override protected function commitProperties():void
+		{
+			super.commitProperties();
+			
+			if (helpContentChanged)
+			{
+				createHelpContent();
+				helpContentChanged = false;
+			}
+		}
+		
+		/**
+		 *  @private
+		 */
+		override protected function getCurrentSkinState():String
+		{
+			if (required)
+			{
+				if (!enabled)
+					return "requiredAndDisabled";
+				else if (elementErrorStrings.length > 0)
+					return "requiredAndError";
+				else
+					return "required";
+			}
+			else
+			{
+				if (!enabled)
+					return "disabled";
+				else if (elementErrorStrings.length > 0)
+					return "error";
+				else
+					return "normal";       
+			}
+		}
+		
+		/**
+		 *  @private
+		 */
+		override protected function partAdded(partName:String, instance:Object) : void
+		{
+			super.partAdded(partName, instance);
+			
+			if (instance == labelDisplay)
+				labelDisplay.text = label;
+			else if (instance == sequenceLabelDisplay)
+				sequenceLabelDisplay.text = sequenceLabel;
+			else if (instance == errorTextDisplay)
+				updateErrorTextDisplay();
+			else if (instance == helpContentGroup)
+			{
+				helpContentChanged = true;
+				createHelpContent();
+			}
+			else if (instance == contentGroup)
+			{
+				contentGroup.addEventListener("errorStringChanged", contentGroup_errorStringdHandler, true);
+			}
+		}
+		
+		/**
+		 *  @private
+		 */
+		override protected function partRemoved(partName:String, instance:Object) : void
+		{
+			super.partRemoved(partName, instance);
+			
+			// Remove the helpContent from the helpContentGroup so that it can be parented
+			// by a different skin's helpContentGroup
+			if (instance == helpContentGroup)
+				/*helpContentGroup.removeAllElements();*/
+			if (instance == contentGroup)
+				contentGroup.removeEventListener("errorStringChanged", contentGroup_errorStringdHandler, true);
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Methods
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @private
+		 */
+		private function updateErrorString():void
+		{
+			var uicElt:UIComponent;
+			_elementErrorStrings = new Vector.<String>;
+			
+			for (var i:int = 0; i < numElements; i++)
+			{
+				uicElt = getElementAt(i) as UIComponent;
+				
+				if (uicElt)
+				{
+					if (uicElt.errorString != "")
+					{
+						_elementErrorStrings.push(uicElt.errorString);
+					}
+				}
+			}
+			
+			invalidateSkinState();
+			
+			updateErrorTextDisplay();
+			dispatchEvent(new Event("elementErrorStringsChanged"));
+		}
+		
+		/**
+		 *  Converts <code>elementErrorStrings</code> into a String, and assigns
+		 *  that String to the <code>errorTextDisplay</code> skin part for display. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		protected function updateErrorTextDisplay():void
+		{
+			var msg:String = "";
+			for (var i:int=0; i < elementErrorStrings.length; i++)
+			{
+				if (msg != "")
+					msg += "\n";
+				msg += elementErrorStrings[i];
+			}
+			
+			if (errorTextDisplay)
+				errorTextDisplay.text = msg;
+			errorString = msg;
+		}
+		
+		/**
+		 *  @private
+		 */
+		private function createHelpContent():void
+		{
+			if (helpContentGroup)
+				helpContentGroup.mxmlContent = _helpContent; 
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Event Handlers 
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @private
+		 */
+		private function contentGroup_errorStringdHandler(event:Event):void
+		{
+			updateErrorString();
+		}
+	}
+}
\ No newline at end of file
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextArea.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextArea.as
index f7e8c337e..0e900330c 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextArea.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextArea.as
@@ -19,745 +19,744 @@
 
 package spark.components
 {
-    
-import org.apache.royale.textLayout.elements.TextFlow;
-/* import flash.events.Event;
-
-import flashx.textLayout.formats.TextLayoutFormat;
-
-import mx.core.ScrollPolicy;
-import mx.core.mx_internal;
-import mx.events.FlexEvent;
-
-import spark.events.TextOperationEvent;
-
-use namespace mx_internal */;
-import spark.components.supportClasses.SkinnableTextBase;
-
-//--------------------------------------
-//  Styles
-//--------------------------------------
-
-/**
- *  @copy spark.components.supportClasses.GroupBase#style:symbolColor
- *  
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Royale 0.9.4
- */ 
-//[Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark")]
-
-/**
- *  Indicates under what conditions the horizontal scroll bar is displayed.
- *
- *  <p><b>For the Mobile theme, this is not supported.</b></p>
- * 
- *  @copy spark.components.Scroller#style:horizontalScrollPolicy
- * 
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Royale 0.9.4
- */ 
-//[Style(name="horizontalScrollPolicy", type="String", inherit="no", enumeration="off,on,auto")]
-
-/**
- *  Indicates under what conditions the vertical scroll bar is displayed.
- *
- *  <p><b>For the Mobile theme, this is not supported.</b></p>
- * 
- *  @copy spark.components.Scroller#style:verticalScrollPolicy
- * 
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Royale 0.9.4
- */ 
-[Style(name="verticalScrollPolicy", type="String", inherit="no", enumeration="off,on,auto")]
-
-//--------------------------------------
-//  Other metadata
-//--------------------------------------
-
-//[DefaultProperty("content")]
-
-//[DefaultTriggerEvent("change")]
-
-//[IconFile("TextArea.png")]
-
-/**
- *  TextArea is a text-entry control that lets users enter and edit
- *  multiple lines of formatted text.
- *
- *  <p><b>The skin for the Spark theme
- *  uses the RichEditableText class. This means that the Spark TextArea control supports 
- *  the Text Layout Framework (TLF) library,
- *  which builds on the Flash Text Engine (FTE).</b>
- *  In combination, these layers provide text editing with
- *  high-quality international typography and layout.  
- *  The skin includes a scroller that can display horizontal and vertical scrollbars
- *  for scrolling through the text and supports vertical scrolling with the mouse wheel.
- *  The RichEditableText can be accessed as <code>textDisplay</code>
- *  and the Scroller as <code>scroller</code>.</p>
- *  
- *  <p><b>The skin for the mobile theme uses the StyleableStageText class.</b>  
- *  Since StyleableStageText uses native text fields it allows for better text entry and 
- *  manipulation experiences on mobile devices however there are some
- *  <a href="supportClasses/StyleableStageText.html">limitations and differences</a> that you should consider.
- *  Because StageText is not capable of measuring text, the TextArea must be given explicit, 
- *  percent-based, or constraint-based <code>width</code> and <code>height</code>.
- *  The StyleableStageText can be accessed as <code>textDisplay</code>.
- *  If you wish to use the TextField-based skin, rather than the
- *  StageText-based skin, set the <code>skinClass</code> property to
- *  <code>"spark.skins.mobile.TextAreaSkin"</code>.</p>
- *
- *  <p>You can set the text to be displayed, or get the text that the user
- *  has entered, using the <code>text</code> property.</p>
- *
- *  <p>The text is formatted using CSS styles such as <code>fontFamily</code>
- *  and <code>fontSize</code>.</p>
- *
- *  <p>For the Spark theme,  the <code>widthInChars</code> and <code>heightInLines</code>
- *  properties let you specify the width and height of the TextArea 
- *  in a way that scales with the font size or you can use the <code>typicalText</code> property.
- *  Note that if you use <code>typicalText</code>, the <code>widthInChars</code> and 
- *  <code>heightInLines</code> properties are ignored.
- *  For all themes, you can also specify an explicit width or height in pixels,
- *  or use a percent width and height or constraints such as
- *  <code>left</code> and <code>right</code>
- *  or <code>top</code> and <code>bottom</code>.</p>
- *
- *  <p>You can use the <code>maxChars</code> property to limit the number
- *  of character that the user can enter, and the <code>restrict</code>
- *  to limit which characters the user can enter.
- *  To use this control for password input, set the
- *  <code>displayAsPassword</code> property to <code>true</code>.</p>
- *
- *  <p>For the mobile theme, the soft-keyboard-specific properties, <code>autoCapitalize</code>,
- *  <code>autoCorrect</code>, <code>returnKeyLabel</code> and <code>softKeyboardType</code>
- *  properties specify keyboard hints. 
- *  If a soft-keyboard is present but does not support a feature represented by the 
- *  hint, the hint is ignored. 
- *  In mobile environments with only hardware keyboards, these hints are ignored. 
- *  </p>
- *  
- *  <p><b>Text Area for the Spark Theme</b></p>
- * 
- *  <p>The most important differences between Spark TextArea and the
- *  MX TextArea control are as follows:
- *  <ul>
- *    <li>Spark TextArea offers better typography, better support
- *        for international languages, and better text layout.</li>
- *    <li>Spark TextArea has an object-oriented model of rich text,
- *        while the MX version does not.</li>
- *    <li>Spark TextArea has better support for displaying
- *        large amounts of text.</li>
- *    <li>Spark TextArea requires that fonts be embedded
- *        differently than the MX version.
- *        To learn how to use the
- *        <code>embedAsCFF</code> attribute when you embed a font,
- *    see the font documentation.</li>
- *  </ul></p>
- *
- *  <p>The Spark TextArea control uses the TLF object-oriented model of rich text,
- *  in which text layout elements such as divisions, paragraphs, spans,
- *  hyperlinks, and images are represented at runtime by ActionScript
- *  objects. You can programmatically access and manipulate these objects.
- *  The central object in TLF for representing rich text is a
- *  TextFlow. Specify rich text for a TextArea control
- *  by setting its <code>textFlow</code> property to a TextFlow instance.</p>
- * 
- *  <p>If you don't need to display text that has multiple formats,
- *  set the TextArea <code>text</code> property to a plain text string.
- *  See the descriptions of the <code>text</code> and <code>textFlow</code>
- *  properties for information about how they interact;
- *  for example, you can set one and get the other.</p>
- *
- *  <p>At compile time, you can put TLF markup tags inside
- *  the TextArea tag, as the following example shows:
- *  <pre>
- *  &lt;s:TextArea&gt;Hello &lt;s:span fontWeight="bold"&gt;World!&lt;/s:span&gt;&lt;/s:TextArea&gt;
- *  </pre>
- *  In this example, the MXML compiler sets the TextArea <code>content</code>
- *  property, causing a TextFlow object to be created from the FlowElements that you specify.</p>
- *
- *  <p>The TextArea control does not include any user interface for changing
- *  the formatting of the text but contains 
- *  APIs that you can use to programmatically format text.
- *  For example, you can create a 
- *  a button that, when clicked, makes the selected text bold.</p>
- *
- *  <p>The default text formatting is determined by CSS styles
- *  such as <a href="supportClasses/SkinnableTextBase.html#style:fontFamily">fontFamily</a>
- *  and <a href="supportClasses/SkinnableTextBase.html#style:fontSize">fontSize</a>.
- *  Any formatting information in the TextFlow object overrides
- *  the default formatting provided by the CSS styles.</p>
- *
- *  <p>You can control many characteristics of TextArea content with styles. Here
- *  are a few popular ones:</p>
- *
- *  <ul><li>Control spacing between lines with the
- *  <code>lineHeight</code> style.</li>
- *  <li>Control the spacing between paragraphs with the 
- *  <code>paragraphSpaceBefore</code> and <code>paragraphSpaceAfter</code> styles.</li>
- *  <li>Align or justify text using the <code>textAlign</code> and <code>textAlignLast</code> styles.</li>
- *  <li>Inset text from the border of the control using the <code>paddingLeft</code>, <code>paddingTop</code>, 
- *  <code>paddingRight</code>, and <code>paddingBottom</code> styles.</li>
- *  </ul>
- *
- *  <p>By default, the text wraps at the right edge of the control.
- *  A vertical scrollbar automatically appears when there is more
- *  text than fits in the TextArea.
- *  If you set the <code>lineBreak</code> style to <code>explicit</code>,
- *  new lines start only at explicit line breaks. This has the same effect as
- *  if you use CR (<code>\r</code>), LF (<code>\n</code>),
- *  or CR+LF (<code>\r\n</code>) in <code>text</code>,
- *  or if you use <code>&lt;p&gt;</code> and <code>&lt;br/&gt;</code>
- *  in TLF markup.
- *  In those cases, a horizontal scrollbar automatically appears
- *  if any lines of text are wider than the control.</p>
- *
- *
- *  <p>The Spark TextArea
- *  can display left-to-right (LTR) text, such as French,
- *  right-to-left (RTL) text, such as Arabic, and bidirectional text,
- *  such as a French phrase inside of an Arabic one.
- *  If the predominant text direction is right-to-left,
- *  set the <code>direction</code> style to <code>rtl</code>.
- *  The <code>textAlign</code> style defaults to <code>start</code>,
- *  which makes the text left-aligned when <code>direction</code>
- *  is <code>ltr</code> and right-aligned when <code>direction</code>
- *  is <code>rtl</code>. To get the opposite alignment,
- *  set <code>textAlign</code> to <code>end</code>.</p>
- *
- *  <p>The Spark TextArea also supports
- *  unlimited undo/redo within one editing session.
- *  An editing session starts when the control gets keyboard focus
- *  and ends when the control loses focus.</p>
- *
- *  <p>To use this component in a list-based component, such as a List or DataGrid, 
- *  create an item renderer.
- *  For information about creating an item renderer, see 
- *  <a href="http://help.adobe.com/en_US/flex/using/WS4bebcd66a74275c3-fc6548e124e49b51c4-8000.html">
- *  Custom Spark item renderers</a>. </p>
- *
- *  <p>For the Spark theme, the TextArea control has the following default characteristics:</p>
- *     <table class="innertable">
- *        <tr>
- *           <th>Characteristic</th>
- *           <th>Description</th>
- *        </tr>
- *        <tr>
- *           <td>Default size</td>
- *           <td>188 pixels wide by 149 pixels high</td>
- *        </tr>
- *        <tr>
- *           <td>Minimum size</td>
- *           <td>36 pixels wide and 36 pixels high</td>
- *        </tr>
- *        <tr>
- *           <td>Maximum size</td>
- *           <td>10000 pixels wide and 10000 pixels high</td>
- *        </tr>
- *        <tr>
- *           <td>Default skin class</td>
- *           <td>spark.skins.spark.TextAreaSkin</td>
- *        </tr>
- *     </table>
- *
- *  <p>For the Mobile theme, the TextArea control has the following default characteristics:</p>
- *     <table class="innertable">
- *        <tr>
- *           <th>Characteristic</th>
- *           <th>Description</th>
- *        </tr>
- *        <tr>
- *           <td>Default skin class</td>
- *           <td>spark.skins.mobile.StageTextAreaSkin</td>
- *        </tr>
- *     </table>
- *
- *  @mxml
- *
- *  <p>The <code>&lt;s:TextArea&gt;</code> tag inherits all of the tag 
- *  attributes of its superclass and adds the following tag attributes:</p>
- *
- *  <pre>
- *  &lt;s:TextArea
- *    <strong>Properties</strong>
- *    heightInLines="<i>Calculated default</i>"  <b>[Spark theme only]</b>
- *    textFlow="<i>TextFlow</i>"  <b>[Spark theme only]</b>
- *    typicalText=null  <b>[Spark theme only]</b>
- *    widthInChars="<i>Calculated default</i>"  <b>[Spark theme only]</b>
- *  
- *    <strong>Styles</strong>
- *    horizontalScrollPolicy="auto"  <b>[Spark theme only]</b>
- *    symbolColor=""
- *    verticalScrollPolicy="auto"  <b>[Spark theme only]</b>
- *  /&gt;
- *  </pre>
- *
- *  @see #text
- *  @see #textFlow
- *  @see spark.components.TextInput
- *  @see spark.components.RichText
- *  @see spark.components.RichEditableText
- *  @see spark.components.Scroller
- *  @see spark.components.Label
- *  @see spark.skins.mobile.StageTextAreaSkin
- *  @see spark.skins.mobile.TextAreaSkin
- *  @see spark.skins.spark.TextAreaSkin
- *
- *  @includeExample examples/TextAreaExample.mxml
- *  
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Royale 0.9.4
- */
-public class TextArea extends SkinnableTextBase
-{
-  //  include "../core/Version.as";
-
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  Constructor. 
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Royale 0.9.4
-     */    
-    public function TextArea()
-    {
-        super();
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    //private var horizontalScrollPolicyChanged:Boolean = false;
-    
-    /**
-     *  @private
-     */
-    //private var verticalScrollPolicyChanged:Boolean = false;
-            
-    //--------------------------------------------------------------------------
-    //
-    //  Skin parts
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  scroller
-    //----------------------------------
-
-    //[SkinPart(required="false")]
-
-    /**
-     *  The optional Scroller in the skin,
-     *  used to scroll the RichEditableText.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Royale 0.9.4
-     */
-    //public var scroller:Scroller;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  suggestedFocusSkinExclusions
-    //----------------------------------
-    
-    /** 
-     * @private 
-     */     
-    //private static const focusExclusions:Array = ["scroller", "textDisplay"];
-    
-    /**
-     *  @private
-     */
-    /* override public function get suggestedFocusSkinExclusions():Array
-    {
-        return focusExclusions;
-    } */
-
-    //----------------------------------
-    //  text
-    //----------------------------------
-
-    //[Bindable("change")]
-    //[Bindable("textChanged")]
-    
-    // Compiler will strip leading and trailing whitespace from text string.
-    //[CollapseWhiteSpace]
-       
-    /**
-     *  @private
-     */
-    /* override public function set text(value:String):void
-    {
-        // Of 'text', 'textFlow', and 'content', the last one set wins.
-        
-        super.text = value;
-        
-        // Trigger bindings to textChanged.
-        dispatchEvent(new Event("textChanged"));        
-    } */
-
-    //--------------------------------------------------------------------------
-    //
-    //  Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  content
-    //----------------------------------
-
-    /**
-     *  @private
-     *  This metadata tells the MXML compiler to disable some of its default
-     *  interpretation of the value specified for the 'content' property.
-     *  Normally, for properties of type Object, it assumes that things
-     *  looking like numbers are numbers and things looking like arrays
-     *  are arrays. But <content>1</content> should generate code to set the
-     *  content to  the String "1", not the int 1, and <content>[1]</content>
-     *  should set it to the String "[1]", not the Array [ 1 ].
-     *  However, {...} continues to be interpreted as a databinding
-     *  expression, and @Resource(...), @Embed(...), etc.
-     *  as compiler directives.
-     *  Similar metadata on TLF classes causes the same rules to apply
-     *  within <p>, <span>, etc.
-     */
-    //[RichTextContent]
-        
-    /**
-     *  This property is intended for use in MXML at compile time;
-     *  to get or set rich text content at runtime,
-     *  use the <code>textFlow</code> property instead. Adobe recommends using 
-     *  <code>textFlow</code> property to get and set rich text content at runtime,
-     *  because it is strongly typed as a TextFlow rather than as an Object.
-     *  A TextFlow is the canonical representation 
-     *  for rich text content in the Text Layout Framework.
-     *
-     *  <p>The <code>content</code> property is the default property
-     *  for TextArea, so that you can write MXML, as the following example shows:
-     *  <pre>
-     *  &lt;s:TextArea&gt;Hello &lt;s:span fontWeight="bold"&gt;World&lt;/s:span&gt;&lt;/s:TextArea&gt;
-     *  </pre>
-     *  In this example, the String and SpanElement that you specify
-     *  as the content are used to create a TextFlow.</p>
-     *
-     *  <p>This property is typed as Object because you can set it to
-     *  to a String, a FlowElement, or an Array of Strings and FlowElements.
-     *  In the example above, the content is
-     *  a 2-element array. The first array element is the String
-     *  "Hello". The second array element is a SpanElement object with the text
-     *  "World" in boldface.</p>
-     * 
-     *  <p>No matter how you specify the content, the content is converted
-     *  to a TextFlow object. When you get the value of this property, you get
-     *  the resulting TextFlow object.</p>
-     * 
-     *  <p><b>For the Mobile theme, this is not supported.</b></p>
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Royale 0.9.4
-     */
-    /* public function get content():Object
-    {
-        return textFlow;
-    } */
-    
-    /**
-     *  @private
-     */   
-    /* public function set content(value:Object):void
-    {
-        // Of 'text', 'textFlow', and 'content', the last one set wins.
-        
-        setContent(value);
-    } */
-    
-    //----------------------------------
-    //  heightInLines
-    //----------------------------------
-
-    //[Inspectable(category="General", minValue="0.0")]
-
-    /**
-     *  The default height of the control, measured in lines.
-     *
-     *  <p>For the Spark theme, see
-     *  <b>spark.components.RichEditableText.heightInLines</b></p>
-     *
-     *  <p><b>For the Mobile theme, this is not supported.</b></p>
-     * 
-     *  @see spark.components.RichEditableText#heightInLines
-     * 
-     *  @default NaN
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Royale 0.9.4
-     */
-    /* public function get heightInLines():Number
-    {
-        return getHeightInLines();
-    } */
-
-    /**
-     *  @private
-     */
-    /* public function set heightInLines(value:Number):void
-    {
-        setHeightInLines(value);
-    } */
-    
-    //----------------------------------
-    //  textFlow
-    //----------------------------------
-
-    // Note:
-    // The 'textFlow' property is not bindable because you can't share a 
-    // TextFlow between two editable components, due to the way that FTE and 
-    // TLF work.
-
-    /**
-     *  The TextFlow representing the rich text displayed by this component.
-     *
-     *  <p>For the Spark theme, see
-     *  <b>spark.components.RichEditableText.textFlow</b></p>
-     *
-     *  <p><b>For the Mobile theme, this is not supported.</b></p>
-     * 
-     *  @see spark.components.RichEditableText#textFlow
-     * 
-     *  @default null
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Royale 0.9.4
-     */
-    public function get textFlow():TextFlow
-    {
-        trace("TextArea textFlow not implemented");
-        //return getTextFlow();
-        return null;
-    }
-
-    /**
-     *  @private
-     */
-    public function set textFlow(value:TextFlow):void
-    {
-        // Of 'text', 'textFlow', and 'content', the last one set wins.
-
-        // setTextFlow(value);
-    } 
-
-    //----------------------------------
-    //  widthInChars
-    //----------------------------------
-
-    //[Inspectable(category="General", minValue="0.0")]
-
-    /**
-     *  The default width of the control, measured in em units.
-     *
-     *  <p>For the Spark theme, see
-     *  <b>spark.components.RichEditableText.widthInChars</b></p>
-     *
-     *  <p><b>For the Mobile theme, this is not supported.</b></p>
-     * 
-     *  @see spark.components.RichEditableText#widthInChars
-     * 
-     *  @default NaN
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Royale 0.9.4
-     */
-    /* public function get widthInChars():Number
-    {
-        return getWidthInChars();
-    } */
-
-    /**
-     *  @private
-     */
-    /* public function set widthInChars(value:Number):void
-    {
-        setWidthInChars(value);
-    } */
-    
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden methods
-    //
-    //--------------------------------------------------------------------------
-    
-    /**
-     *  @private
-     *  Pushes various TextInput properties down into the RichEditableText. 
-     */
-    /* override protected function commitProperties():void
-    {
-        super.commitProperties();
-        
-        if (horizontalScrollPolicyChanged)
-        {
-            if (scroller)
-                scroller.setStyle("horizontalScrollPolicy", getStyle("horizontalScrollPolicy"));
-            horizontalScrollPolicyChanged = false;
-        }
-
-        if (verticalScrollPolicyChanged)
-        {
-            if (scroller)
-                scroller.setStyle("verticalScrollPolicy", getStyle("verticalScrollPolicy"));
-            verticalScrollPolicyChanged = false;
-        }
-    } */
-
-    /**
-     *  @private
-     */
-    /* override public function styleChanged(styleProp:String):void
-    {
-        var allStyles:Boolean = (styleProp == null || styleProp == "styleName");
-        super.styleChanged(styleProp);
-
-        if (allStyles || styleProp == "horizontalScrollPolicy")
-        {
-            horizontalScrollPolicyChanged = true;
-            invalidateProperties();
-        }
-        if (allStyles || styleProp == "verticalScrollPolicy")
-        {
-            verticalScrollPolicyChanged = true;
-            invalidateProperties();
-        }
-    } */
-    
-    /**
-     *  @private
-     */
-    /* override protected function partAdded(partName:String, instance:Object):void
-    {
-        super.partAdded(partName, instance);
-
-        if (instance == textDisplay)
-        {
-            // In default.css, the TextArea selector has a declaration
-            // for lineBreak which sets it to "toFit".
-
-            // The skin is loaded after the intial properties have been
-            // set so these wipe out explicit sets.
-            textDisplay.multiline = true;
-        }
-        
-        // The scroller, between textDisplay and this in the chain, should not 
-        // getFocus.
-        else if (instance == scroller)
-        {
-            scroller.focusEnabled = false;
-            
-            // TLF does scrolling in real numbers.  If the scroller doesn't
-            // round to ints then the sets of verticalScrollPosition and
-            // horizontalScrollPosition will be no-ops which is desirable.
-            if (scroller.horizontalScrollBar)
-                scroller.horizontalScrollBar.snapInterval = 0;
-            if (scroller.verticalScrollBar)
-                scroller.verticalScrollBar.snapInterval = 0;
-        }
-    } */
-
-    //--------------------------------------------------------------------------
-    //
-    //  Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @copy spark.components.RichEditableText#getFormatOfRange()
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Royale 0.9.4
-     */
-    /* public function getFormatOfRange(requestedFormats:Vector.<String>=null,
-                                     anchorPosition:int=-1,
-                                     activePosition:int=-1):TextLayoutFormat
-    {
-        if (!(textDisplay is RichEditableText))
-            return null;
-
-        return RichEditableText(textDisplay).getFormatOfRange(
-                    requestedFormats, anchorPosition, activePosition);
-    } */
-
-    /**
-     *  @copy spark.components.RichEditableText#setFormatOfRange()
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Royale 0.9.4
-     */
-    /* public function setFormatOfRange(format:TextLayoutFormat,
-                                     anchorPosition:int=-1, 
-                                     activePosition:int=-1):void
-    {
-        if (!(textDisplay is RichEditableText))
-            return;
-
-        RichEditableText(textDisplay).setFormatOfRange(
-                    format, anchorPosition, activePosition);
-    } */
-
-    /**
-     *  @copy spark.components.RichEditableText#scrollToRange()
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Royale 0.9.4
-     */
-    /* public function scrollToRange(anchorPosition:int = 0,
-                                  activePosition:int = int.MAX_VALUE):void
-    {
-        if (!textDisplay)
-            return;
-
-        textDisplay.scrollToRange(anchorPosition, activePosition);
-    } */
-}
-
+	
+	import org.apache.royale.textLayout.elements.TextFlow;
+	/* import flash.events.Event;
+	
+	import flashx.textLayout.formats.TextLayoutFormat;
+	
+	import mx.core.ScrollPolicy;
+	import mx.core.mx_internal;
+	import mx.events.FlexEvent;
+	
+	import spark.events.TextOperationEvent;
+	
+	use namespace mx_internal */;
+	import spark.components.supportClasses.SkinnableTextBase;
+	
+	//--------------------------------------
+	//  Styles
+	//--------------------------------------
+	
+	/**
+	 *  @copy spark.components.supportClasses.GroupBase#style:symbolColor
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Royale 0.9.4
+	 */ 
+	//[Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark")]
+	
+	/**
+	 *  Indicates under what conditions the horizontal scroll bar is displayed.
+	 *
+	 *  <p><b>For the Mobile theme, this is not supported.</b></p>
+	 * 
+	 *  @copy spark.components.Scroller#style:horizontalScrollPolicy
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Royale 0.9.4
+	 */ 
+	//[Style(name="horizontalScrollPolicy", type="String", inherit="no", enumeration="off,on,auto")]
+	
+	/**
+	 *  Indicates under what conditions the vertical scroll bar is displayed.
+	 *
+	 *  <p><b>For the Mobile theme, this is not supported.</b></p>
+	 * 
+	 *  @copy spark.components.Scroller#style:verticalScrollPolicy
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Royale 0.9.4
+	 */ 
+	[Style(name="verticalScrollPolicy", type="String", inherit="no", enumeration="off,on,auto")]
+	
+	//--------------------------------------
+	//  Other metadata
+	//--------------------------------------
+	
+	//[DefaultProperty("content")]
+	
+	//[DefaultTriggerEvent("change")]
+	
+	//[IconFile("TextArea.png")]
+	
+	/**
+	 *  TextArea is a text-entry control that lets users enter and edit
+	 *  multiple lines of formatted text.
+	 *
+	 *  <p><b>The skin for the Spark theme
+	 *  uses the RichEditableText class. This means that the Spark TextArea control supports 
+	 *  the Text Layout Framework (TLF) library,
+	 *  which builds on the Flash Text Engine (FTE).</b>
+	 *  In combination, these layers provide text editing with
+	 *  high-quality international typography and layout.  
+	 *  The skin includes a scroller that can display horizontal and vertical scrollbars
+	 *  for scrolling through the text and supports vertical scrolling with the mouse wheel.
+	 *  The RichEditableText can be accessed as <code>textDisplay</code>
+	 *  and the Scroller as <code>scroller</code>.</p>
+	 *  
+	 *  <p><b>The skin for the mobile theme uses the StyleableStageText class.</b>  
+	 *  Since StyleableStageText uses native text fields it allows for better text entry and 
+	 *  manipulation experiences on mobile devices however there are some
+	 *  <a href="supportClasses/StyleableStageText.html">limitations and differences</a> that you should consider.
+	 *  Because StageText is not capable of measuring text, the TextArea must be given explicit, 
+	 *  percent-based, or constraint-based <code>width</code> and <code>height</code>.
+	 *  The StyleableStageText can be accessed as <code>textDisplay</code>.
+	 *  If you wish to use the TextField-based skin, rather than the
+	 *  StageText-based skin, set the <code>skinClass</code> property to
+	 *  <code>"spark.skins.mobile.TextAreaSkin"</code>.</p>
+	 *
+	 *  <p>You can set the text to be displayed, or get the text that the user
+	 *  has entered, using the <code>text</code> property.</p>
+	 *
+	 *  <p>The text is formatted using CSS styles such as <code>fontFamily</code>
+	 *  and <code>fontSize</code>.</p>
+	 *
+	 *  <p>For the Spark theme,  the <code>widthInChars</code> and <code>heightInLines</code>
+	 *  properties let you specify the width and height of the TextArea 
+	 *  in a way that scales with the font size or you can use the <code>typicalText</code> property.
+	 *  Note that if you use <code>typicalText</code>, the <code>widthInChars</code> and 
+	 *  <code>heightInLines</code> properties are ignored.
+	 *  For all themes, you can also specify an explicit width or height in pixels,
+	 *  or use a percent width and height or constraints such as
+	 *  <code>left</code> and <code>right</code>
+	 *  or <code>top</code> and <code>bottom</code>.</p>
+	 *
+	 *  <p>You can use the <code>maxChars</code> property to limit the number
+	 *  of character that the user can enter, and the <code>restrict</code>
+	 *  to limit which characters the user can enter.
+	 *  To use this control for password input, set the
+	 *  <code>displayAsPassword</code> property to <code>true</code>.</p>
+	 *
+	 *  <p>For the mobile theme, the soft-keyboard-specific properties, <code>autoCapitalize</code>,
+	 *  <code>autoCorrect</code>, <code>returnKeyLabel</code> and <code>softKeyboardType</code>
+	 *  properties specify keyboard hints. 
+	 *  If a soft-keyboard is present but does not support a feature represented by the 
+	 *  hint, the hint is ignored. 
+	 *  In mobile environments with only hardware keyboards, these hints are ignored. 
+	 *  </p>
+	 *  
+	 *  <p><b>Text Area for the Spark Theme</b></p>
+	 * 
+	 *  <p>The most important differences between Spark TextArea and the
+	 *  MX TextArea control are as follows:
+	 *  <ul>
+	 *    <li>Spark TextArea offers better typography, better support
+	 *        for international languages, and better text layout.</li>
+	 *    <li>Spark TextArea has an object-oriented model of rich text,
+	 *        while the MX version does not.</li>
+	 *    <li>Spark TextArea has better support for displaying
+	 *        large amounts of text.</li>
+	 *    <li>Spark TextArea requires that fonts be embedded
+	 *        differently than the MX version.
+	 *        To learn how to use the
+	 *        <code>embedAsCFF</code> attribute when you embed a font,
+	 *    see the font documentation.</li>
+	 *  </ul></p>
+	 *
+	 *  <p>The Spark TextArea control uses the TLF object-oriented model of rich text,
+	 *  in which text layout elements such as divisions, paragraphs, spans,
+	 *  hyperlinks, and images are represented at runtime by ActionScript
+	 *  objects. You can programmatically access and manipulate these objects.
+	 *  The central object in TLF for representing rich text is a
+	 *  TextFlow. Specify rich text for a TextArea control
+	 *  by setting its <code>textFlow</code> property to a TextFlow instance.</p>
+	 * 
+	 *  <p>If you don't need to display text that has multiple formats,
+	 *  set the TextArea <code>text</code> property to a plain text string.
+	 *  See the descriptions of the <code>text</code> and <code>textFlow</code>
+	 *  properties for information about how they interact;
+	 *  for example, you can set one and get the other.</p>
+	 *
+	 *  <p>At compile time, you can put TLF markup tags inside
+	 *  the TextArea tag, as the following example shows:
+	 *  <pre>
+	 *  &lt;s:TextArea&gt;Hello &lt;s:span fontWeight="bold"&gt;World!&lt;/s:span&gt;&lt;/s:TextArea&gt;
+	 *  </pre>
+	 *  In this example, the MXML compiler sets the TextArea <code>content</code>
+	 *  property, causing a TextFlow object to be created from the FlowElements that you specify.</p>
+	 *
+	 *  <p>The TextArea control does not include any user interface for changing
+	 *  the formatting of the text but contains 
+	 *  APIs that you can use to programmatically format text.
+	 *  For example, you can create a 
+	 *  a button that, when clicked, makes the selected text bold.</p>
+	 *
+	 *  <p>The default text formatting is determined by CSS styles
+	 *  such as <a href="supportClasses/SkinnableTextBase.html#style:fontFamily">fontFamily</a>
+	 *  and <a href="supportClasses/SkinnableTextBase.html#style:fontSize">fontSize</a>.
+	 *  Any formatting information in the TextFlow object overrides
+	 *  the default formatting provided by the CSS styles.</p>
+	 *
+	 *  <p>You can control many characteristics of TextArea content with styles. Here
+	 *  are a few popular ones:</p>
+	 *
+	 *  <ul><li>Control spacing between lines with the
+	 *  <code>lineHeight</code> style.</li>
+	 *  <li>Control the spacing between paragraphs with the 
+	 *  <code>paragraphSpaceBefore</code> and <code>paragraphSpaceAfter</code> styles.</li>
+	 *  <li>Align or justify text using the <code>textAlign</code> and <code>textAlignLast</code> styles.</li>
+	 *  <li>Inset text from the border of the control using the <code>paddingLeft</code>, <code>paddingTop</code>, 
+	 *  <code>paddingRight</code>, and <code>paddingBottom</code> styles.</li>
+	 *  </ul>
+	 *
+	 *  <p>By default, the text wraps at the right edge of the control.
+	 *  A vertical scrollbar automatically appears when there is more
+	 *  text than fits in the TextArea.
+	 *  If you set the <code>lineBreak</code> style to <code>explicit</code>,
+	 *  new lines start only at explicit line breaks. This has the same effect as
+	 *  if you use CR (<code>\r</code>), LF (<code>\n</code>),
+	 *  or CR+LF (<code>\r\n</code>) in <code>text</code>,
+	 *  or if you use <code>&lt;p&gt;</code> and <code>&lt;br/&gt;</code>
+	 *  in TLF markup.
+	 *  In those cases, a horizontal scrollbar automatically appears
+	 *  if any lines of text are wider than the control.</p>
+	 *
+	 *
+	 *  <p>The Spark TextArea
+	 *  can display left-to-right (LTR) text, such as French,
+	 *  right-to-left (RTL) text, such as Arabic, and bidirectional text,
+	 *  such as a French phrase inside of an Arabic one.
+	 *  If the predominant text direction is right-to-left,
+	 *  set the <code>direction</code> style to <code>rtl</code>.
+	 *  The <code>textAlign</code> style defaults to <code>start</code>,
+	 *  which makes the text left-aligned when <code>direction</code>
+	 *  is <code>ltr</code> and right-aligned when <code>direction</code>
+	 *  is <code>rtl</code>. To get the opposite alignment,
+	 *  set <code>textAlign</code> to <code>end</code>.</p>
+	 *
+	 *  <p>The Spark TextArea also supports
+	 *  unlimited undo/redo within one editing session.
+	 *  An editing session starts when the control gets keyboard focus
+	 *  and ends when the control loses focus.</p>
+	 *
+	 *  <p>To use this component in a list-based component, such as a List or DataGrid, 
+	 *  create an item renderer.
+	 *  For information about creating an item renderer, see 
+	 *  <a href="http://help.adobe.com/en_US/flex/using/WS4bebcd66a74275c3-fc6548e124e49b51c4-8000.html">
+	 *  Custom Spark item renderers</a>. </p>
+	 *
+	 *  <p>For the Spark theme, the TextArea control has the following default characteristics:</p>
+	 *     <table class="innertable">
+	 *        <tr>
+	 *           <th>Characteristic</th>
+	 *           <th>Description</th>
+	 *        </tr>
+	 *        <tr>
+	 *           <td>Default size</td>
+	 *           <td>188 pixels wide by 149 pixels high</td>
+	 *        </tr>
+	 *        <tr>
+	 *           <td>Minimum size</td>
+	 *           <td>36 pixels wide and 36 pixels high</td>
+	 *        </tr>
+	 *        <tr>
+	 *           <td>Maximum size</td>
+	 *           <td>10000 pixels wide and 10000 pixels high</td>
+	 *        </tr>
+	 *        <tr>
+	 *           <td>Default skin class</td>
+	 *           <td>spark.skins.spark.TextAreaSkin</td>
+	 *        </tr>
+	 *     </table>
+	 *
+	 *  <p>For the Mobile theme, the TextArea control has the following default characteristics:</p>
+	 *     <table class="innertable">
+	 *        <tr>
+	 *           <th>Characteristic</th>
+	 *           <th>Description</th>
+	 *        </tr>
+	 *        <tr>
+	 *           <td>Default skin class</td>
+	 *           <td>spark.skins.mobile.StageTextAreaSkin</td>
+	 *        </tr>
+	 *     </table>
+	 *
+	 *  @mxml
+	 *
+	 *  <p>The <code>&lt;s:TextArea&gt;</code> tag inherits all of the tag 
+	 *  attributes of its superclass and adds the following tag attributes:</p>
+	 *
+	 *  <pre>
+	 *  &lt;s:TextArea
+	 *    <strong>Properties</strong>
+	 *    heightInLines="<i>Calculated default</i>"  <b>[Spark theme only]</b>
+	 *    textFlow="<i>TextFlow</i>"  <b>[Spark theme only]</b>
+	 *    typicalText=null  <b>[Spark theme only]</b>
+	 *    widthInChars="<i>Calculated default</i>"  <b>[Spark theme only]</b>
+	 *  
+	 *    <strong>Styles</strong>
+	 *    horizontalScrollPolicy="auto"  <b>[Spark theme only]</b>
+	 *    symbolColor=""
+	 *    verticalScrollPolicy="auto"  <b>[Spark theme only]</b>
+	 *  /&gt;
+	 *  </pre>
+	 *
+	 *  @see #text
+	 *  @see #textFlow
+	 *  @see spark.components.TextInput
+	 *  @see spark.components.RichText
+	 *  @see spark.components.RichEditableText
+	 *  @see spark.components.Scroller
+	 *  @see spark.components.Label
+	 *  @see spark.skins.mobile.StageTextAreaSkin
+	 *  @see spark.skins.mobile.TextAreaSkin
+	 *  @see spark.skins.spark.TextAreaSkin
+	 *
+	 *  @includeExample examples/TextAreaExample.mxml
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Royale 0.9.4
+	 */
+	public class TextArea extends SkinnableTextBase
+	{
+		//  include "../core/Version.as";
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  Constructor. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion Royale 0.9.4
+		 */    
+		public function TextArea()
+		{
+			super();
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @private
+		 */
+		//private var horizontalScrollPolicyChanged:Boolean = false;
+		
+		/**
+		 *  @private
+		 */
+		//private var verticalScrollPolicyChanged:Boolean = false;
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Skin parts
+		//
+		//--------------------------------------------------------------------------
+		
+		//----------------------------------
+		//  scroller
+		//----------------------------------
+		
+		//[SkinPart(required="false")]
+		
+		/**
+		 *  The optional Scroller in the skin,
+		 *  used to scroll the RichEditableText.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion Royale 0.9.4
+		 */
+		public var scroller:Scroller;
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden properties
+		//
+		//--------------------------------------------------------------------------
+		
+		//----------------------------------
+		//  suggestedFocusSkinExclusions
+		//----------------------------------
+		
+		/** 
+		 * @private 
+		 */     
+		//private static const focusExclusions:Array = ["scroller", "textDisplay"];
+		
+		/**
+		 *  @private
+		 */
+		/* override public function get suggestedFocusSkinExclusions():Array
+		{
+		return focusExclusions;
+		} */
+		
+		//----------------------------------
+		//  text
+		//----------------------------------
+		
+		//[Bindable("change")]
+		//[Bindable("textChanged")]
+		
+		// Compiler will strip leading and trailing whitespace from text string.
+		//[CollapseWhiteSpace]
+		
+		/**
+		 *  @private
+		 */
+		/* override public function set text(value:String):void
+		{
+		// Of 'text', 'textFlow', and 'content', the last one set wins.
+		
+		super.text = value;
+		
+		// Trigger bindings to textChanged.
+		dispatchEvent(new Event("textChanged"));        
+		} */
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Properties
+		//
+		//--------------------------------------------------------------------------
+		
+		//----------------------------------
+		//  content
+		//----------------------------------
+		
+		/**
+		 *  @private
+		 *  This metadata tells the MXML compiler to disable some of its default
+		 *  interpretation of the value specified for the 'content' property.
+		 *  Normally, for properties of type Object, it assumes that things
+		 *  looking like numbers are numbers and things looking like arrays
+		 *  are arrays. But <content>1</content> should generate code to set the
+		 *  content to  the String "1", not the int 1, and <content>[1]</content>
+		 *  should set it to the String "[1]", not the Array [ 1 ].
+		 *  However, {...} continues to be interpreted as a databinding
+		 *  expression, and @Resource(...), @Embed(...), etc.
+		 *  as compiler directives.
+		 *  Similar metadata on TLF classes causes the same rules to apply
+		 *  within <p>, <span>, etc.
+		 */
+		//[RichTextContent]
+		
+		/**
+		 *  This property is intended for use in MXML at compile time;
+		 *  to get or set rich text content at runtime,
+		 *  use the <code>textFlow</code> property instead. Adobe recommends using 
+		 *  <code>textFlow</code> property to get and set rich text content at runtime,
+		 *  because it is strongly typed as a TextFlow rather than as an Object.
+		 *  A TextFlow is the canonical representation 
+		 *  for rich text content in the Text Layout Framework.
+		 *
+		 *  <p>The <code>content</code> property is the default property
+		 *  for TextArea, so that you can write MXML, as the following example shows:
+		 *  <pre>
+		 *  &lt;s:TextArea&gt;Hello &lt;s:span fontWeight="bold"&gt;World&lt;/s:span&gt;&lt;/s:TextArea&gt;
+		 *  </pre>
+		 *  In this example, the String and SpanElement that you specify
+		 *  as the content are used to create a TextFlow.</p>
+		 *
+		 *  <p>This property is typed as Object because you can set it to
+		 *  to a String, a FlowElement, or an Array of Strings and FlowElements.
+		 *  In the example above, the content is
+		 *  a 2-element array. The first array element is the String
+		 *  "Hello". The second array element is a SpanElement object with the text
+		 *  "World" in boldface.</p>
+		 * 
+		 *  <p>No matter how you specify the content, the content is converted
+		 *  to a TextFlow object. When you get the value of this property, you get
+		 *  the resulting TextFlow object.</p>
+		 * 
+		 *  <p><b>For the Mobile theme, this is not supported.</b></p>
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion Royale 0.9.4
+		 */
+		/* public function get content():Object
+		{
+		return textFlow;
+		} */
+		
+		/**
+		 *  @private
+		 */   
+		/* public function set content(value:Object):void
+		{
+		// Of 'text', 'textFlow', and 'content', the last one set wins.
+		
+		setContent(value);
+		} */
+		
+		//----------------------------------
+		//  heightInLines
+		//----------------------------------
+		
+		//[Inspectable(category="General", minValue="0.0")]
+		
+		/**
+		 *  The default height of the control, measured in lines.
+		 *
+		 *  <p>For the Spark theme, see
+		 *  <b>spark.components.RichEditableText.heightInLines</b></p>
+		 *
+		 *  <p><b>For the Mobile theme, this is not supported.</b></p>
+		 * 
+		 *  @see spark.components.RichEditableText#heightInLines
+		 * 
+		 *  @default NaN
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion Royale 0.9.4
+		 */
+		/* public function get heightInLines():Number
+		{
+		return getHeightInLines();
+		} */
+		
+		/**
+		 *  @private
+		 */
+		/* public function set heightInLines(value:Number):void
+		{
+		setHeightInLines(value);
+		} */
+		
+		//----------------------------------
+		//  textFlow
+		//----------------------------------
+		
+		// Note:
+		// The 'textFlow' property is not bindable because you can't share a 
+		// TextFlow between two editable components, due to the way that FTE and 
+		// TLF work.
+		
+		/**
+		 *  The TextFlow representing the rich text displayed by this component.
+		 *
+		 *  <p>For the Spark theme, see
+		 *  <b>spark.components.RichEditableText.textFlow</b></p>
+		 *
+		 *  <p><b>For the Mobile theme, this is not supported.</b></p>
+		 * 
+		 *  @see spark.components.RichEditableText#textFlow
+		 * 
+		 *  @default null
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion Royale 0.9.4
+		 */
+		public function get textFlow():TextFlow
+		{
+			trace("TextArea textFlow not implemented");
+			//return getTextFlow();
+			return null;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function set textFlow(value:TextFlow):void
+		{
+			// Of 'text', 'textFlow', and 'content', the last one set wins.
+			
+			// setTextFlow(value);
+		} 
+		
+		//----------------------------------
+		//  widthInChars
+		//----------------------------------
+		
+		//[Inspectable(category="General", minValue="0.0")]
+		
+		/**
+		 *  The default width of the control, measured in em units.
+		 *
+		 *  <p>For the Spark theme, see
+		 *  <b>spark.components.RichEditableText.widthInChars</b></p>
+		 *
+		 *  <p><b>For the Mobile theme, this is not supported.</b></p>
+		 * 
+		 *  @see spark.components.RichEditableText#widthInChars
+		 * 
+		 *  @default NaN
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion Royale 0.9.4
+		 */
+		/* public function get widthInChars():Number
+		{
+		return getWidthInChars();
+		} */
+		
+		/**
+		 *  @private
+		 */
+		/* public function set widthInChars(value:Number):void
+		{
+		setWidthInChars(value);
+		} */
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @private
+		 *  Pushes various TextInput properties down into the RichEditableText. 
+		 */
+		/* override protected function commitProperties():void
+		{
+		super.commitProperties();
+		
+		if (horizontalScrollPolicyChanged)
+		{
+		if (scroller)
+		scroller.setStyle("horizontalScrollPolicy", getStyle("horizontalScrollPolicy"));
+		horizontalScrollPolicyChanged = false;
+		}
+		
+		if (verticalScrollPolicyChanged)
+		{
+		if (scroller)
+		scroller.setStyle("verticalScrollPolicy", getStyle("verticalScrollPolicy"));
+		verticalScrollPolicyChanged = false;
+		}
+		} */
+		
+		/**
+		 *  @private
+		 */
+		/* override public function styleChanged(styleProp:String):void
+		{
+		var allStyles:Boolean = (styleProp == null || styleProp == "styleName");
+		super.styleChanged(styleProp);
+		
+		if (allStyles || styleProp == "horizontalScrollPolicy")
+		{
+		horizontalScrollPolicyChanged = true;
+		invalidateProperties();
+		}
+		if (allStyles || styleProp == "verticalScrollPolicy")
+		{
+		verticalScrollPolicyChanged = true;
+		invalidateProperties();
+		}
+		} */
+		
+		/**
+		 *  @private
+		 */
+		/* override protected function partAdded(partName:String, instance:Object):void
+		{
+		super.partAdded(partName, instance);
+		
+		if (instance == textDisplay)
+		{
+		// In default.css, the TextArea selector has a declaration
+		// for lineBreak which sets it to "toFit".
+		
+		// The skin is loaded after the intial properties have been
+		// set so these wipe out explicit sets.
+		textDisplay.multiline = true;
+		}
+		
+		// The scroller, between textDisplay and this in the chain, should not 
+		// getFocus.
+		else if (instance == scroller)
+		{
+		scroller.focusEnabled = false;
+		
+		// TLF does scrolling in real numbers.  If the scroller doesn't
+		// round to ints then the sets of verticalScrollPosition and
+		// horizontalScrollPosition will be no-ops which is desirable.
+		if (scroller.horizontalScrollBar)
+		scroller.horizontalScrollBar.snapInterval = 0;
+		if (scroller.verticalScrollBar)
+		scroller.verticalScrollBar.snapInterval = 0;
+		}
+		} */
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Methods
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @copy spark.components.RichEditableText#getFormatOfRange()
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion Royale 0.9.4
+		 */
+		/* public function getFormatOfRange(requestedFormats:Vector.<String>=null,
+		anchorPosition:int=-1,
+		activePosition:int=-1):TextLayoutFormat
+		{
+		if (!(textDisplay is RichEditableText))
+		return null;
+		
+		return RichEditableText(textDisplay).getFormatOfRange(
+		requestedFormats, anchorPosition, activePosition);
+		} */
+		
+		/**
+		 *  @copy spark.components.RichEditableText#setFormatOfRange()
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion Royale 0.9.4
+		 */
+		/* public function setFormatOfRange(format:TextLayoutFormat,
+		anchorPosition:int=-1, 
+		activePosition:int=-1):void
+		{
+		if (!(textDisplay is RichEditableText))
+		return;
+		
+		RichEditableText(textDisplay).setFormatOfRange(
+		format, anchorPosition, activePosition);
+		} */
+		
+		/**
+		 *  @copy spark.components.RichEditableText#scrollToRange()
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.5
+		 *  @productversion Royale 0.9.4
+		 */
+		public function scrollToRange(anchorPosition:int = 0, activePosition:int = 0 /*int.MAX_VALUE*/):void
+		{
+			// if (!textDisplay)
+			//    return;
+			
+			// textDisplay.scrollToRange(anchorPosition, activePosition);
+		}
+	}
+	
 }
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/gridClasses/GridItemRenderer.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/gridClasses/GridItemRenderer.as
index c4fc94973..e67322b37 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/gridClasses/GridItemRenderer.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/gridClasses/GridItemRenderer.as
@@ -19,872 +19,878 @@
 
 package spark.components.gridClasses
 {
-    /*import flash.display.DisplayObject;
-    import flash.events.Event;
-    import flash.geom.Point;
-    import flash.geom.Rectangle;*/
-	import org.apache.royale.events.Event;
-	import org.apache.royale.geom.Point;
-	import org.apache.royale.geom.Rectangle;
-
-    import mx.core.IToolTip;
-    import mx.core.IUIComponent;
-    import mx.core.LayoutDirection;
-    import mx.core.mx_internal;
-    import mx.events.FlexEvent;
-    import mx.events.ToolTipEvent;
-    import mx.managers.IToolTipManagerClient;
-    import mx.managers.ToolTipManager;
-    import mx.utils.PopUpUtil;
-    import mx.validators.IValidatorListener;
-
-    import spark.components.Grid;
-    import spark.components.Group;
-    import spark.components.supportClasses.TextBase;
-
-    use namespace mx_internal;
-
-//--------------------------------------
-//  Events
-//--------------------------------------
-
-/**
- *  Dispatched when the <code>data</code> property changes.
- *
- *  @eventType mx.events.FlexEvent.DATA_CHANGE
- *  
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 2.5
- *  @productversion Flex 4.5
- */
-[Event(name="dataChange", type="mx.events.FlexEvent")]
-
-//--------------------------------------
-//  Excluded APIs
-//--------------------------------------
-
-[Exclude(name="transitions", kind="property")]
-
-/**
- *  The GridItemRenderer class defines the base class for custom item renderers
- *  for the Spark grid controls, such as DataGrid and Grid.   
- *  Item renderers are only required to display column-specific aspects of their data.  
- *  They are not responsible for displaying the selection or hover indicators, 
- *  the alternating background color (if any), or row or column separators.
- *
- *  <p>Item renderers are associated with each column of a grid.
- *  Set the item renderer for a column by using 
- *  the <code>GridColumn.itemRenderer property</code>.</p> 
- * 
- *  <p>By default, an item renderer does not clip to the boundaries of the cell.
- *  If your renderer extends past the bounds of the cell, you can set 
- *  <code>clipAndEnableScrolling</code> to <code>true</code> to clip the renderer to the bounds 
- *  of the cell.</p>
- * 
- *  <p>Transitions in DataGrid item renderers aren't supported. The GridItemRenderer class 
- *  has disabled its <code>transitions</code> property so setting it will have no effect.</p>
- * 
- *  <p><b>Efficiency Considerations</b></p>
- *  
- *  <p>DataGrid scrolling and startup performance are directly linked
- *  to item renderer complexity and the number of item renderers that
- *  are visible within the DataGrid's scroller.  Custom GridItemRenderer 
- *  instances are used and reused repeatedly so it's important to define 
- *  them as simply and efficiently as  possible.</p>
- *  
- *  <p>If an item renderer's responsibility is limited to displaying
- *  one or more lines of text, then developers should seriously
- *  consider using the DefaultItemRenderer class which does so very
- *  economically (an application that's only going to be deployed on
- *  Windows one can gain some additional performance by using the
- *  UITextFieldGridItemRenderer class instead).  The most efficient
- *  way to use GridItemRenderer to display the GridColumn's dataField
- *  as text is to identify the GridItemRenderer's text displaying
- *  element with <code>id="labelDisplay"</code>.  The labelDisplay
- *  component must be a <code>TextBase</code> subclass like
- *  <code>Label</code> or <code>RichText</code>.  You might take this
- *  approach, instead of just using DefaultGridItemRenderer, if your
- *  item renderer included some additional elements that did not
- *  depend on the item renderer's data, like borders or other graphic
- *  elements.</p>
- *  
- *  <p>An item renderer that contains more than one visual element
- *  whose properties depend on the item renderer's data can use data
- *  binding to define the values of those properties.  This approach
- *  yields MXML code that's straightforward to read and maintain and
- *  its performance may be adequate if the number of visible item
- *  renderers is limited (see the DataGrid <code>requestedRowCount</code> 
- *  and <code>requestedColumnCount</code> properties).  The most efficient
- *  way to configure this kind of item renderer is to override its
- *  <code>prepare()</code> method and do the work there.  The
- *  renderer's <code>prepare()</code> method is called each time the
- *  renderer is redisplayed and so it's important that it's coded
- *  efficiently.  If your item renderer is stateful, for example if it
- *  caches internal values, you can clear its state in its
- *  <code>discard()</code> method.  The <code>discard()</code> method
- *  is called each time the renderer is moved to the DataGrid's
- *  internal free list, where it's available for reuse.</p>
- *  
- *  <p>GridItemRenderers should be as simple as possible.  To gain the
- *  best possible performance, minimize the number of components, and
- *  the depth of the hierarchy.  If it's practical, use explicit
- *  positions and sizes rather than constraints to define the layout.
- *  DataGrid's with <code>variableRowHeight="false"</code> (the
- *  default) tend to perform better, likewise for
- *  <code>showDataTips="false"</code> (the default) and
- *  <code>clipAndEnableScrolling="false"</code> (the default).</p>
- *  
- *  <p>Examples of the various GridItemRenderer configurations described 
- *  here are available in the examples section.</p>
- * 
- *  @see spark.components.DataGrid
- *  @see spark.components.Grid
- *  @see spark.components.gridClasses.GridColumn
- *  @see spark.components.gridClasses.GridColumn#itemRenderer
- *  @see spark.skins.spark.DefaultGridItemRenderer
- *  
- *  @includeExample examples/GridItemRendererExample.mxml
- *  @includeExample examples/GridItemRendererCustomBindingExample.mxml
- *  @includeExample examples/GridItemRendererCustomPrepareExample.mxml
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 2.5
- *  @productversion Flex 4.5
- */
-public class GridItemRenderer extends Group implements IGridItemRenderer
-{
-    // include "../../core/Version.as";
-    
-    //--------------------------------------------------------------------------
-    //
-    //  Static Methods
-    //
-    //--------------------------------------------------------------------------
-    
-    /**
-     * If the effective value of showDataTips has changed for this column, then
-     * set the renderer's toolTip property to a placeholder.  The real tooltip
-     * text is computed in the TOOL_TIP_SHOW handler below.
-     */    
-    static mx_internal function initializeRendererToolTip(renderer:IGridItemRenderer):void
-    {
-        const toolTipClient:IToolTipManagerClient = renderer as IToolTipManagerClient;
-        if (!toolTipClient)
-            return;
-        
-        const showDataTips:Boolean = (renderer.rowIndex != -1) && renderer.column && renderer.column.getShowDataTips();
-        const dataTip:String = toolTipClient.toolTip;
-        
-        if (!dataTip && showDataTips)
-            toolTipClient.toolTip = "<dataTip>";
-        else if (dataTip && !showDataTips)
-            toolTipClient.toolTip = null;
-    }
-    
-    /**
-     *  Shows the tooltip for one of the grid's item renderers.
-     *  This is the handler for the <code>ToolTipEvent.TOOL_TIP_SHOW</code>
-     *  event in GridItemRenderer, DefaultGridItemRenderer, and 
-     *  UITextFieldGridItemRenderer which are installed by the corresponding
-     *  constructors.
-     *  The item renderer's tool tip is computed just before it is shown.
-     * 
-     *  If the item renderer's column <code>showDataTips<code> property is true, 
-     *  a placeholder tool tip is registered with the tool tip manager so that 
-     *  mouse handlers are put in place to detect when the tool tip should be
-     *  shown by calling this handler.
-     *   
-     *  This handler replaces the placeholder text with the actual text and 
-     *  resizes the tooltip before moving it into position.  
-     *  The tip is positioned over the item renderer with the origin of the tip 
-     *  at 0, 0, after accounting for the layoutDirection of the grid.
-     *  
-     *  The current target is expected to implement IGridItemRenderer and
-     *  IUIComponent.
-     */ 
-    static mx_internal function toolTipShowHandler(event:ToolTipEvent):void
-    {
-        var toolTip:IToolTip = event.toolTip;
-        
-        const renderer:IGridItemRenderer = event.currentTarget as IGridItemRenderer;
-        if (!renderer)
-            return;
-        
-        const uiComp:IUIComponent = event.currentTarget as IUIComponent;
-        if (!uiComp)
-            return;
-
-        if(uiComp is IValidatorListener && IValidatorListener(uiComp).errorString)
-            return;
-        
-        // If the renderer is partially obscured because the Grid has been 
-        // scrolled, we'll put the tooltip in the center of the exposed portion
-        // of the renderer.
-        
-        var rendererR:Rectangle = new Rectangle(
-            renderer.getLayoutBoundsX(),
-            renderer.getLayoutBoundsY(),
-            renderer.getLayoutBoundsWidth(),
-            renderer.getLayoutBoundsHeight());
-        
-        const scrollR:Rectangle = renderer.grid.scrollRect;
-        if (scrollR)
-            rendererR = rendererR.intersection(scrollR);  // exposed renderer b
-        
-        if ((rendererR.height == 0) || (rendererR.width == 0))
-            return;
-            
-        // Determine if the toolTip needs to be adjusted for RTL layout.
-        const mirror:Boolean = renderer.layoutDirection == LayoutDirection.RTL;
-        
-        // Lazily compute the tooltip text and recalculate its width.
-        toolTip.text = renderer.column.itemToDataTip(renderer.data);
-        ToolTipManager.sizeTip(toolTip);
-        
-        // We need to position the tooltip at same x coordinate, 
-        // center vertically and make sure it doesn't overlap the screen.
-        // Call the helper function to handle this for us.
-
-        // x,y: tooltip's location relative to the renderer's layout bounds
-        // Assume there's no scaling in the coordinate space between renderer.width and toolTip.width 
-        const x:int =  mirror ? (renderer.width - toolTip.width) : (rendererR.x - renderer.getLayoutBoundsX());
-        const y:int = rendererR.y - renderer.getLayoutBoundsY() + ((rendererR.height - toolTip.height) / 2);
-
-        var pt:Point = PopUpUtil.positionOverComponent(DisplayObject(uiComp),
-                                                       uiComp.systemManager,
-                                                       toolTip.width, 
-                                                       toolTip.height,
-                                                       NaN, 
-                                                       null, 
-                                                       new Point(x, y)); 
-        toolTip.move(pt.x, pt.y);
-    }
-         
-   //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-    
-    /**
-     *  Constructor.
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function GridItemRenderer()
-    {
-        super();
-        
-        setCurrentStateNeeded = true;
-        accessibilityEnabled = false;
-        
-        addEventListener(ToolTipEvent.TOOL_TIP_SHOW, GridItemRenderer.toolTipShowHandler);           
-    }
-    
-    //--------------------------------------------------------------------------
-    //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-    
-    /**
-     *  @private
-     *  True if the renderer has been created and commitProperties hasn't
-     *  run yet. See commitProperties.
-     */
-    private var setCurrentStateNeeded:Boolean = false;
-    
-    /**
-     *  @private
-     *  A flag determining if this renderer should play any 
-     *  associated transitions when a state change occurs. 
-     */
-    mx_internal var playTransitions:Boolean = false; 
-    
-    //--------------------------------------------------------------------------
-    //
-    //  Properties
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    private function dispatchChangeEvent(eventType:String):void
-    {
-        if (hasEventListener(eventType))
-            dispatchEvent(new Event(eventType));
-    }
-    
-    //----------------------------------
-    //  baselinePosition override
-    //----------------------------------
-    
-    /**
-     *  @private
-     */
-    override public function get baselinePosition():Number
-    {
-        if (!validateBaselinePosition() || !labelDisplay)
-            return super.baselinePosition;
-        
-        const labelPosition:Point = globalToLocal(labelDisplay.parent.localToGlobal(
-            new Point(labelDisplay.x, labelDisplay.y)));
-        
-        return labelPosition.y + labelDisplay.baselinePosition;
-    }
-
-    //----------------------------------
-    //  column
-    //----------------------------------
-    
-    private var _column:GridColumn = null;
-    
-    [Bindable("columnChanged")]
-    
-    /**
-     *  @inheritDoc
-     * 
-     *  <p>The Grid's <code>updateDisplayList()</code> method sets this property 
-     *  before calling <code>preprare()</code></p>. 
-     *  
-     *  @default null
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get column():GridColumn
-    {
-        return _column;
-    }
-    
-    /**
-     *  @private
-     */
-    public function set column(value:GridColumn):void
-    {
-        if (_column == value)
-            return;
-        
-        _column = value;
-        dispatchChangeEvent("columnChanged");
-    }
-    
-    //----------------------------------
-    //  columnIndex
-    //----------------------------------
-    
-    /**
-     *  @inheritDoc 
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get columnIndex():int
-    {
-        return (column) ? column.columnIndex : -1;
-    }
-    
-    //----------------------------------
-    //  data
-    //----------------------------------
-    
-    private var _data:Object = null;
-    
-    [Bindable("dataChange")]  // compatible with FlexEvent.DATA_CHANGE
-    
-    /**
-     *  The value of the data provider item for the grid row 
-     *  corresponding to the item renderer.
-     *  This value corresponds to the object returned by a call to the 
-     *  <code>dataProvider.getItemAt(rowIndex)</code> method.
-     *
-     *  <p>Item renderers can override this property definition to access 
-     *  the data for the entire row of the grid. </p>
-     *  
-     *  @default null
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get data():Object
-    {
-        return _data;
-    }
-    
-    /**
-     *  @private
-     */
-    public function set data(value:Object):void
-    {
-        if (_data == value)
-            return;
-        
-        _data = value;
-        
-        const eventType:String = "dataChange"; 
-        if (hasEventListener(eventType))
-            dispatchEvent(new FlexEvent(eventType));  
-    }
-    
-    //----------------------------------
-    //  down
-    //----------------------------------
-    
-    /**
-     *  @private
-     *  storage for the down property 
-     */
-    private var _down:Boolean = false;
-    
-    /**
-     *  @inheritDoc
-     *
-     *  @default false
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */    
-    public function get down():Boolean
-    {
-        return _down;
-    }
-    
-    /**
-     *  @private
-     */    
-    public function set down(value:Boolean):void
-    {
-        if (value == _down)
-            return;
-        
-        _down = value;
-        setCurrentState(getCurrentRendererState(), playTransitions);
-    }
-    
-    //----------------------------------
-    //  grid
-    //----------------------------------
-    
-    /**
-     *  Returns the Grid associated with this item renderer.
-     *  This is the same value as <code>column.grid</code>.
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5 
-     */
-    public function get grid():Grid
-    {
-        return (column) ? column.grid : null;
-    }    
-
-    //----------------------------------
-    //  hovered
-    //----------------------------------
-    
-    private var _hovered:Boolean = false;
-    
-    /**
-     *  @inheritDoc
-     *
-     *  @default false
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */    
-    public function get hovered():Boolean
-    {
-        return _hovered;
-    }
-    
-    /**
-     *  @private
-     */    
-    public function set hovered(value:Boolean):void
-    {
-        if (value == _hovered)
-            return;
-        
-        _hovered = value;
-        setCurrentState(getCurrentRendererState(), playTransitions);
-    }
-    
-    //----------------------------------
-    //  rowIndex
-    //----------------------------------
-
-    private var _rowIndex:int = -1;
-    
-    [Bindable("rowIndexChanged")]
-    
-    /**
-     *  @inheritDoc
-     * 
-     *  <p>The Grid's <code>updateDisplayList()</code> method sets this property 
-     *  before calling <code>prepare()</code></p>.   
-     * 
-     *  @default -1
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */    
-    public function get rowIndex():int
-    {
-        return _rowIndex;
-    }
-    
-    /**
-     *  @private
-     */    
-    public function set rowIndex(value:int):void
-    {
-        if (_rowIndex == value)
-            return;
-        
-        _rowIndex = value;
-        dispatchChangeEvent("rowIndexChanged");        
-    }
-    
-    //----------------------------------
-    //  showsCaret
-    //----------------------------------
-    
-    private var _showsCaret:Boolean = false;
-    
-    [Bindable("showsCaretChanged")]    
-    
-    /**
-     *  @inheritDoc
-     * 
-     *  <p>The Grid's <code>updateDisplayList()</code> method sets this property 
-     *  before calling <code>preprare()</code></p>.   
-     * 
-     *  @default false
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */    
-    public function get showsCaret():Boolean
-    {
-        return _showsCaret;
-    }
-    
-    /**
-     *  @private
-     */    
-    public function set showsCaret(value:Boolean):void
-    {
-        if (_showsCaret == value)
-            return;
-        
-        _showsCaret = value;
-        setCurrentState(getCurrentRendererState(), playTransitions);
-        dispatchChangeEvent("labelDisplayChanged");           
-    }
-    
-    //----------------------------------
-    //  selected
-    //----------------------------------
-
-    private var _selected:Boolean = false;
-    
-    [Bindable("selectedChanged")]    
-    
-    /**
-     *  @inheritDoc
-     * 
-     *  <p>The Grid's <code>updateDisplayList()</code> method sets this property 
-     *  before calling <code>preprare()</code></p>.   
-     * 
-     *  @default false
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */    
-    public function get selected():Boolean
-    {
-        return _selected;
-    }
-    
-    /**
-     *  @private
-     */    
-    public function set selected(value:Boolean):void
-    {
-        if (_selected == value)
-            return;
-        
-        _selected = value;
-        setCurrentState(getCurrentRendererState(), playTransitions);
-        dispatchChangeEvent("selectedChanged");        
-    }
-    
-    //----------------------------------
-    //  dragging
-    //----------------------------------
-    
-    private var _dragging:Boolean = false;
-    
-    [Bindable("draggingChanged")]        
-    
-    /**
-     *  @inheritDoc
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get dragging():Boolean
-    {
-        return _dragging;
-    }
-    
-    /**
-     *  @private  
-     */
-    public function set dragging(value:Boolean):void
-    {
-        if (_dragging == value)
-            return;
-        
-        _dragging = value;
-        setCurrentState(getCurrentRendererState(), playTransitions);
-        dispatchChangeEvent("draggingChanged");        
-    }
-    
-    //----------------------------------
-    //  label
-    //----------------------------------
-    
-    private var _label:String = "";
-    
-    [Bindable("labelChanged")]
-    
-    /**
-     *  @copy IGridItemRenderer#label
-     *
-     *  @default ""
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get label():String
-    {
-        return _label;
-    }
-    
-    /**
-     *  @private
-     */ 
-    public function set label(value:String):void
-    {
-        if (_label == value)
-            return;
-        
-        _label = value;
-        
-        if (labelDisplay)
-            labelDisplay.text = _label;
-        
-        dispatchChangeEvent("labelChanged");
-    }
-    
-    //----------------------------------
-    //  labelDisplay
-    //----------------------------------
-    
-    private var _labelDisplay:TextBase = null;
-    
-    [Bindable("labelDisplayChanged")]
-    
-    /**
-     *  An optional visual component in the item renderer 
-     *  for displaying the <code>label</code> property.   
-     *  If you use this property to specify a visual component, 
-     *  the component's <code>text</code> property is kept synchronized 
-     *  with the item renderer's <code>label</code> property.
-     * 
-     *  @default null
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */    
-    public function get labelDisplay():TextBase
-    {
-        return _labelDisplay
-    }
-    
-    /**
-     *  @private
-     */    
-    public function set labelDisplay(value:TextBase):void
-    {
-        if (_labelDisplay == value)
-            return;
-        
-        _labelDisplay = value;
-        dispatchChangeEvent("labelDisplayChanged");        
-    }
-    
-    //--------------------------------------------------------------------------
-    //
-    //  Methods - ItemRenderer State Support 
-    //
-    //--------------------------------------------------------------------------
-    
-    /**
-     *  Returns the name of the state to be applied to the renderer. 
-     *  For example, a basic item renderer returns the String "normal", "hovered", 
-     *  or "selected" to specify the renderer's state. 
-     *  If dealing with touch interactions (or mouse interactions where selection
-     *  is ignored), "down" and "downAndSelected" can also be returned.
-     * 
-     *  <p>A subclass of GridItemRenderer must override this method to return a value 
-     *  if the behavior desired differs from the default behavior.</p>
-     * 
-     *  <p>In Flex 4.0, the 3 main states were "normal", "hovered", and "selected".
-     *  In Flex 4.5, "down" and "downAndSelected" have been added.</p>
-     *  
-     *  <p>The full set of states supported (in order of precedence) are: 
-     *    <ul>
-     *      <li>dragging</li>
-     *      <li>downAndSelected</li>
-     *      <li>selectedAndShowsCaret</li>
-     *      <li>hoveredAndShowsCaret</li>
-     *      <li>normalAndShowsCaret</li>
-     *      <li>down</li>
-     *      <li>selected</li>
-     *      <li>hovered</li>
-     *      <li>normal</li>
-     *    </ul>
-     *  </p>
-     * 
-     *  @return A String specifying the name of the state to apply to the renderer. 
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    protected function getCurrentRendererState():String
-    {
-        // this code is pretty confusing without multi-dimensional states, but it's
-        // defined in order of precedence.
-        
-        if (dragging && hasState("dragging"))
-            return "dragging";
-        
-        if (selected && down && hasState("downAndSelected"))
-            return "downAndSelected";
-        
-        if (selected && showsCaret && hasState("selectedAndShowsCaret"))
-            return "selectedAndShowsCaret";
-        
-        if (hovered && showsCaret && hasState("hoveredAndShowsCaret"))
-            return "hoveredAndShowsCaret";
-        
-        if (showsCaret && hasState("normalAndShowsCaret"))
-            return "normalAndShowsCaret"; 
-        
-        if (down && hasState("down"))
-            return "down";
-        
-        if (selected && hasState("selected"))
-            return "selected";
-        
-        if (hovered && hasState("hovered"))
-            return "hovered";
-        
-        if (hasState("normal"))    
-            return "normal";
-        
-        // If none of the above states are defined in the item renderer,
-        // we return null. This means the user-defined renderer
-        // will display but essentially be non-interactive visually. 
-        return null;
-    }
-    
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden Methods
-    //
-    //--------------------------------------------------------------------------
-    
-    /**
-     *  @private
-     */ 
-    override protected function commitProperties():void
-    {
-        super.commitProperties();
-        
-        if (setCurrentStateNeeded)
-        {
-            setCurrentState(getCurrentRendererState(), playTransitions); 
-            setCurrentStateNeeded = false;
-        }
-    }
-    
-    /**
-     *  @private
-     */
-    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
-    {
-        super.updateDisplayList(width, height);
-        
-        initializeRendererToolTip(this);
-    } 
-        
-    /**
-     *  @inheritDoc
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function prepare(hasBeenRecycled:Boolean):void
-    {
-    }
-
-    /**
-     *  @inheritDoc
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function discard(willBeRecycled:Boolean):void
-    {
-    }
-            
-}
+	COMPILE::SWF {
+		import flash.display.DisplayObject;
+		import flash.events.Event;
+		import flash.geom.Point;
+		import flash.geom.Rectangle;
+	}
+		
+		COMPILE::JS {
+			import org.apache.royale.events.Event;
+			import org.apache.royale.geom.Point;
+			import org.apache.royale.geom.Rectangle;
+		}	
+		
+		import mx.core.IToolTip;
+	import mx.core.IUIComponent;
+	import mx.core.LayoutDirection;
+	import mx.core.mx_internal;
+	import mx.events.FlexEvent;
+	import mx.events.ToolTipEvent;
+	import mx.managers.IToolTipManagerClient;
+	import mx.managers.ToolTipManager;
+	import mx.utils.PopUpUtil;
+	import mx.validators.IValidatorListener;
+	
+	import spark.components.Grid;
+	import spark.components.Group;
+	import spark.components.supportClasses.TextBase;
+	
+	use namespace mx_internal;
+	
+	//--------------------------------------
+	//  Events
+	//--------------------------------------
+	
+	/**
+	 *  Dispatched when the <code>data</code> property changes.
+	 *
+	 *  @eventType mx.events.FlexEvent.DATA_CHANGE
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	[Event(name="dataChange", type="mx.events.FlexEvent")]
+	
+	//--------------------------------------
+	//  Excluded APIs
+	//--------------------------------------
+	
+	[Exclude(name="transitions", kind="property")]
+	
+	/**
+	 *  The GridItemRenderer class defines the base class for custom item renderers
+	 *  for the Spark grid controls, such as DataGrid and Grid.   
+	 *  Item renderers are only required to display column-specific aspects of their data.  
+	 *  They are not responsible for displaying the selection or hover indicators, 
+	 *  the alternating background color (if any), or row or column separators.
+	 *
+	 *  <p>Item renderers are associated with each column of a grid.
+	 *  Set the item renderer for a column by using 
+	 *  the <code>GridColumn.itemRenderer property</code>.</p> 
+	 * 
+	 *  <p>By default, an item renderer does not clip to the boundaries of the cell.
+	 *  If your renderer extends past the bounds of the cell, you can set 
+	 *  <code>clipAndEnableScrolling</code> to <code>true</code> to clip the renderer to the bounds 
+	 *  of the cell.</p>
+	 * 
+	 *  <p>Transitions in DataGrid item renderers aren't supported. The GridItemRenderer class 
+	 *  has disabled its <code>transitions</code> property so setting it will have no effect.</p>
+	 * 
+	 *  <p><b>Efficiency Considerations</b></p>
+	 *  
+	 *  <p>DataGrid scrolling and startup performance are directly linked
+	 *  to item renderer complexity and the number of item renderers that
+	 *  are visible within the DataGrid's scroller.  Custom GridItemRenderer 
+	 *  instances are used and reused repeatedly so it's important to define 
+	 *  them as simply and efficiently as  possible.</p>
+	 *  
+	 *  <p>If an item renderer's responsibility is limited to displaying
+	 *  one or more lines of text, then developers should seriously
+	 *  consider using the DefaultItemRenderer class which does so very
+	 *  economically (an application that's only going to be deployed on
+	 *  Windows one can gain some additional performance by using the
+	 *  UITextFieldGridItemRenderer class instead).  The most efficient
+	 *  way to use GridItemRenderer to display the GridColumn's dataField
+	 *  as text is to identify the GridItemRenderer's text displaying
+	 *  element with <code>id="labelDisplay"</code>.  The labelDisplay
+	 *  component must be a <code>TextBase</code> subclass like
+	 *  <code>Label</code> or <code>RichText</code>.  You might take this
+	 *  approach, instead of just using DefaultGridItemRenderer, if your
+	 *  item renderer included some additional elements that did not
+	 *  depend on the item renderer's data, like borders or other graphic
+	 *  elements.</p>
+	 *  
+	 *  <p>An item renderer that contains more than one visual element
+	 *  whose properties depend on the item renderer's data can use data
+	 *  binding to define the values of those properties.  This approach
+	 *  yields MXML code that's straightforward to read and maintain and
+	 *  its performance may be adequate if the number of visible item
+	 *  renderers is limited (see the DataGrid <code>requestedRowCount</code> 
+	 *  and <code>requestedColumnCount</code> properties).  The most efficient
+	 *  way to configure this kind of item renderer is to override its
+	 *  <code>prepare()</code> method and do the work there.  The
+	 *  renderer's <code>prepare()</code> method is called each time the
+	 *  renderer is redisplayed and so it's important that it's coded
+	 *  efficiently.  If your item renderer is stateful, for example if it
+	 *  caches internal values, you can clear its state in its
+	 *  <code>discard()</code> method.  The <code>discard()</code> method
+	 *  is called each time the renderer is moved to the DataGrid's
+	 *  internal free list, where it's available for reuse.</p>
+	 *  
+	 *  <p>GridItemRenderers should be as simple as possible.  To gain the
+	 *  best possible performance, minimize the number of components, and
+	 *  the depth of the hierarchy.  If it's practical, use explicit
+	 *  positions and sizes rather than constraints to define the layout.
+	 *  DataGrid's with <code>variableRowHeight="false"</code> (the
+	 *  default) tend to perform better, likewise for
+	 *  <code>showDataTips="false"</code> (the default) and
+	 *  <code>clipAndEnableScrolling="false"</code> (the default).</p>
+	 *  
+	 *  <p>Examples of the various GridItemRenderer configurations described 
+	 *  here are available in the examples section.</p>
+	 * 
+	 *  @see spark.components.DataGrid
+	 *  @see spark.components.Grid
+	 *  @see spark.components.gridClasses.GridColumn
+	 *  @see spark.components.gridClasses.GridColumn#itemRenderer
+	 *  @see spark.skins.spark.DefaultGridItemRenderer
+	 *  
+	 *  @includeExample examples/GridItemRendererExample.mxml
+	 *  @includeExample examples/GridItemRendererCustomBindingExample.mxml
+	 *  @includeExample examples/GridItemRendererCustomPrepareExample.mxml
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	public class GridItemRenderer extends Group implements IGridItemRenderer
+	{
+		// include "../../core/Version.as";
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Static Methods
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 * If the effective value of showDataTips has changed for this column, then
+		 * set the renderer's toolTip property to a placeholder.  The real tooltip
+		 * text is computed in the TOOL_TIP_SHOW handler below.
+		 */    
+		static mx_internal function initializeRendererToolTip(renderer:IGridItemRenderer):void
+		{
+			const toolTipClient:IToolTipManagerClient = renderer as IToolTipManagerClient;
+			if (!toolTipClient)
+				return;
+			
+			const showDataTips:Boolean = (renderer.rowIndex != -1) && renderer.column && renderer.column.getShowDataTips();
+			const dataTip:String = toolTipClient.toolTip;
+			
+			if (!dataTip && showDataTips)
+				toolTipClient.toolTip = "<dataTip>";
+			else if (dataTip && !showDataTips)
+				toolTipClient.toolTip = null;
+		}
+		
+		/**
+		 *  Shows the tooltip for one of the grid's item renderers.
+		 *  This is the handler for the <code>ToolTipEvent.TOOL_TIP_SHOW</code>
+		 *  event in GridItemRenderer, DefaultGridItemRenderer, and 
+		 *  UITextFieldGridItemRenderer which are installed by the corresponding
+		 *  constructors.
+		 *  The item renderer's tool tip is computed just before it is shown.
+		 * 
+		 *  If the item renderer's column <code>showDataTips<code> property is true, 
+		 *  a placeholder tool tip is registered with the tool tip manager so that 
+		 *  mouse handlers are put in place to detect when the tool tip should be
+		 *  shown by calling this handler.
+		 *   
+		 *  This handler replaces the placeholder text with the actual text and 
+		 *  resizes the tooltip before moving it into position.  
+		 *  The tip is positioned over the item renderer with the origin of the tip 
+		 *  at 0, 0, after accounting for the layoutDirection of the grid.
+		 *  
+		 *  The current target is expected to implement IGridItemRenderer and
+		 *  IUIComponent.
+		 */ 
+		static mx_internal function toolTipShowHandler(event:ToolTipEvent):void
+		{
+			var toolTip:IToolTip = event.toolTip;
+			
+			const renderer:IGridItemRenderer = event.currentTarget as IGridItemRenderer;
+			if (!renderer)
+				return;
+			
+			const uiComp:IUIComponent = event.currentTarget as IUIComponent;
+			if (!uiComp)
+				return;
+			
+			if(uiComp is IValidatorListener && IValidatorListener(uiComp).errorString)
+				return;
+			
+			// If the renderer is partially obscured because the Grid has been 
+			// scrolled, we'll put the tooltip in the center of the exposed portion
+			// of the renderer.
+			
+			var rendererR:Rectangle = new Rectangle(
+				renderer.getLayoutBoundsX(),
+				renderer.getLayoutBoundsY(),
+				renderer.getLayoutBoundsWidth(),
+				renderer.getLayoutBoundsHeight());
+			
+			const scrollR:Rectangle = renderer.grid.scrollRect;
+			if (scrollR)
+				rendererR = rendererR.intersection(scrollR);  // exposed renderer b
+			
+			if ((rendererR.height == 0) || (rendererR.width == 0))
+				return;
+			
+			// Determine if the toolTip needs to be adjusted for RTL layout.
+			const mirror:Boolean = false; /*renderer.layoutDirection == LayoutDirection.RTL;*/
+			
+			// Lazily compute the tooltip text and recalculate its width.
+			toolTip.text = renderer.column.itemToDataTip(renderer.data);
+			ToolTipManager.sizeTip(toolTip);
+			
+			// We need to position the tooltip at same x coordinate, 
+			// center vertically and make sure it doesn't overlap the screen.
+			// Call the helper function to handle this for us.
+			
+			// x,y: tooltip's location relative to the renderer's layout bounds
+			// Assume there's no scaling in the coordinate space between renderer.width and toolTip.width 
+			const x:int =  mirror ? (renderer.width - toolTip.width) : (rendererR.x - renderer.getLayoutBoundsX());
+			const y:int = rendererR.y - renderer.getLayoutBoundsY() + ((rendererR.height - toolTip.height) / 2);
+			
+			/*var pt:Point = PopUpUtil.positionOverComponent(DisplayObject(uiComp),
+			uiComp.systemManager,
+			toolTip.width, 
+			toolTip.height,
+			NaN, 
+			null, 
+			new Point(x, y)); 
+			toolTip.move(pt.x, pt.y);*/
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  Constructor.
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function GridItemRenderer()
+		{
+			super();
+			
+			setCurrentStateNeeded = true;
+			accessibilityEnabled = false;
+			
+			addEventListener(ToolTipEvent.TOOL_TIP_SHOW, GridItemRenderer.toolTipShowHandler);           
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @private
+		 *  True if the renderer has been created and commitProperties hasn't
+		 *  run yet. See commitProperties.
+		 */
+		private var setCurrentStateNeeded:Boolean = false;
+		
+		/**
+		 *  @private
+		 *  A flag determining if this renderer should play any 
+		 *  associated transitions when a state change occurs. 
+		 */
+		mx_internal var playTransitions:Boolean = false; 
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Properties
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @private
+		 */
+		private function dispatchChangeEvent(eventType:String):void
+		{
+			/*if (hasEventListener(eventType))
+				dispatchEvent(new Event(eventType));*/
+		}
+		
+		//----------------------------------
+		//  baselinePosition override
+		//----------------------------------
+		
+		/**
+		 *  @private
+		 */
+		override public function get baselinePosition():Number
+		{
+			/*if (!validateBaselinePosition() || !labelDisplay)
+				return super.baselinePosition;
+			
+			const labelPosition:Point = globalToLocal(labelDisplay.parent.localToGlobal(
+				new Point(labelDisplay.x, labelDisplay.y)));
+			
+			return labelPosition.y + labelDisplay.baselinePosition;*/
+			return 0;
+		}
+		
+		//----------------------------------
+		//  column
+		//----------------------------------
+		
+		private var _column:GridColumn = null;
+		
+		[Bindable("columnChanged")]
+		
+		/**
+		 *  @inheritDoc
+		 * 
+		 *  <p>The Grid's <code>updateDisplayList()</code> method sets this property 
+		 *  before calling <code>preprare()</code></p>. 
+		 *  
+		 *  @default null
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function get column():GridColumn
+		{
+			return _column;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function set column(value:GridColumn):void
+		{
+			if (_column == value)
+				return;
+			
+			_column = value;
+			dispatchChangeEvent("columnChanged");
+		}
+		
+		//----------------------------------
+		//  columnIndex
+		//----------------------------------
+		
+		/**
+		 *  @inheritDoc 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function get columnIndex():int
+		{
+			return (column) ? column.columnIndex : -1;
+		}
+		
+		//----------------------------------
+		//  data
+		//----------------------------------
+		
+		private var _data:Object = null;
+		
+		[Bindable("dataChange")]  // compatible with FlexEvent.DATA_CHANGE
+		
+		/**
+		 *  The value of the data provider item for the grid row 
+		 *  corresponding to the item renderer.
+		 *  This value corresponds to the object returned by a call to the 
+		 *  <code>dataProvider.getItemAt(rowIndex)</code> method.
+		 *
+		 *  <p>Item renderers can override this property definition to access 
+		 *  the data for the entire row of the grid. </p>
+		 *  
+		 *  @default null
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function get data():Object
+		{
+			return _data;
+		}
+		
+		/**
+		 *  @private
+		 */
+		public function set data(value:Object):void
+		{
+			if (_data == value)
+				return;
+			
+			_data = value;
+			
+			const eventType:String = "dataChange"; 
+			if (hasEventListener(eventType))
+				dispatchEvent(new FlexEvent(eventType));  
+		}
+		
+		//----------------------------------
+		//  down
+		//----------------------------------
+		
+		/**
+		 *  @private
+		 *  storage for the down property 
+		 */
+		private var _down:Boolean = false;
+		
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @default false
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */    
+		public function get down():Boolean
+		{
+			return _down;
+		}
+		
+		/**
+		 *  @private
+		 */    
+		public function set down(value:Boolean):void
+		{
+			if (value == _down)
+				return;
+			
+			_down = value;
+			// setCurrentState(getCurrentRendererState(), playTransitions);
+		}
+		
+		//----------------------------------
+		//  grid
+		//----------------------------------
+		
+		/**
+		 *  Returns the Grid associated with this item renderer.
+		 *  This is the same value as <code>column.grid</code>.
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5 
+		 */
+		public function get grid():Grid
+		{
+			return (column) ? column.grid : null;
+		}    
+		
+		//----------------------------------
+		//  hovered
+		//----------------------------------
+		
+		private var _hovered:Boolean = false;
+		
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @default false
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */    
+		public function get hovered():Boolean
+		{
+			return _hovered;
+		}
+		
+		/**
+		 *  @private
+		 */    
+		public function set hovered(value:Boolean):void
+		{
+			if (value == _hovered)
+				return;
+			
+			_hovered = value;
+			// setCurrentState(getCurrentRendererState(), playTransitions);
+		}
+		
+		//----------------------------------
+		//  rowIndex
+		//----------------------------------
+		
+		private var _rowIndex:int = -1;
+		
+		[Bindable("rowIndexChanged")]
+		
+		/**
+		 *  @inheritDoc
+		 * 
+		 *  <p>The Grid's <code>updateDisplayList()</code> method sets this property 
+		 *  before calling <code>prepare()</code></p>.   
+		 * 
+		 *  @default -1
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */    
+		public function get rowIndex():int
+		{
+			return _rowIndex;
+		}
+		
+		/**
+		 *  @private
+		 */    
+		public function set rowIndex(value:int):void
+		{
+			if (_rowIndex == value)
+				return;
+			
+			_rowIndex = value;
+			dispatchChangeEvent("rowIndexChanged");        
+		}
+		
+		//----------------------------------
+		//  showsCaret
+		//----------------------------------
+		
+		private var _showsCaret:Boolean = false;
+		
+		[Bindable("showsCaretChanged")]    
+		
+		/**
+		 *  @inheritDoc
+		 * 
+		 *  <p>The Grid's <code>updateDisplayList()</code> method sets this property 
+		 *  before calling <code>preprare()</code></p>.   
+		 * 
+		 *  @default false
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */    
+		public function get showsCaret():Boolean
+		{
+			return _showsCaret;
+		}
+		
+		/**
+		 *  @private
+		 */    
+		public function set showsCaret(value:Boolean):void
+		{
+			if (_showsCaret == value)
+				return;
+			
+			_showsCaret = value;
+			// setCurrentState(getCurrentRendererState(), playTransitions);
+			dispatchChangeEvent("labelDisplayChanged");           
+		}
+		
+		//----------------------------------
+		//  selected
+		//----------------------------------
+		
+		private var _selected:Boolean = false;
+		
+		[Bindable("selectedChanged")]    
+		
+		/**
+		 *  @inheritDoc
+		 * 
+		 *  <p>The Grid's <code>updateDisplayList()</code> method sets this property 
+		 *  before calling <code>preprare()</code></p>.   
+		 * 
+		 *  @default false
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */    
+		public function get selected():Boolean
+		{
+			return _selected;
+		}
+		
+		/**
+		 *  @private
+		 */    
+		public function set selected(value:Boolean):void
+		{
+			if (_selected == value)
+				return;
+			
+			_selected = value;
+			// setCurrentState(getCurrentRendererState(), playTransitions);
+			dispatchChangeEvent("selectedChanged");        
+		}
+		
+		//----------------------------------
+		//  dragging
+		//----------------------------------
+		
+		private var _dragging:Boolean = false;
+		
+		[Bindable("draggingChanged")]        
+		
+		/**
+		 *  @inheritDoc
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function get dragging():Boolean
+		{
+			return _dragging;
+		}
+		
+		/**
+		 *  @private  
+		 */
+		public function set dragging(value:Boolean):void
+		{
+			if (_dragging == value)
+				return;
+			
+			_dragging = value;
+			// setCurrentState(getCurrentRendererState(), playTransitions);
+			dispatchChangeEvent("draggingChanged");        
+		}
+		
+		//----------------------------------
+		//  label
+		//----------------------------------
+		
+		private var _label:String = "";
+		
+		[Bindable("labelChanged")]
+		
+		/**
+		 *  @copy IGridItemRenderer#label
+		 *
+		 *  @default ""
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function get label():String
+		{
+			return _label;
+		}
+		
+		/**
+		 *  @private
+		 */ 
+		public function set label(value:String):void
+		{
+			if (_label == value)
+				return;
+			
+			_label = value;
+			
+			if (labelDisplay)
+				labelDisplay.text = _label;
+			
+			dispatchChangeEvent("labelChanged");
+		}
+		
+		//----------------------------------
+		//  labelDisplay
+		//----------------------------------
+		
+		private var _labelDisplay:TextBase = null;
+		
+		[Bindable("labelDisplayChanged")]
+		
+		/**
+		 *  An optional visual component in the item renderer 
+		 *  for displaying the <code>label</code> property.   
+		 *  If you use this property to specify a visual component, 
+		 *  the component's <code>text</code> property is kept synchronized 
+		 *  with the item renderer's <code>label</code> property.
+		 * 
+		 *  @default null
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */    
+		public function get labelDisplay():TextBase
+		{
+			return _labelDisplay
+		}
+		
+		/**
+		 *  @private
+		 */    
+		public function set labelDisplay(value:TextBase):void
+		{
+			if (_labelDisplay == value)
+				return;
+			
+			_labelDisplay = value;
+			dispatchChangeEvent("labelDisplayChanged");        
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Methods - ItemRenderer State Support 
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  Returns the name of the state to be applied to the renderer. 
+		 *  For example, a basic item renderer returns the String "normal", "hovered", 
+		 *  or "selected" to specify the renderer's state. 
+		 *  If dealing with touch interactions (or mouse interactions where selection
+		 *  is ignored), "down" and "downAndSelected" can also be returned.
+		 * 
+		 *  <p>A subclass of GridItemRenderer must override this method to return a value 
+		 *  if the behavior desired differs from the default behavior.</p>
+		 * 
+		 *  <p>In Flex 4.0, the 3 main states were "normal", "hovered", and "selected".
+		 *  In Flex 4.5, "down" and "downAndSelected" have been added.</p>
+		 *  
+		 *  <p>The full set of states supported (in order of precedence) are: 
+		 *    <ul>
+		 *      <li>dragging</li>
+		 *      <li>downAndSelected</li>
+		 *      <li>selectedAndShowsCaret</li>
+		 *      <li>hoveredAndShowsCaret</li>
+		 *      <li>normalAndShowsCaret</li>
+		 *      <li>down</li>
+		 *      <li>selected</li>
+		 *      <li>hovered</li>
+		 *      <li>normal</li>
+		 *    </ul>
+		 *  </p>
+		 * 
+		 *  @return A String specifying the name of the state to apply to the renderer. 
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		protected function getCurrentRendererState():String
+		{
+			// this code is pretty confusing without multi-dimensional states, but it's
+			// defined in order of precedence.
+			/*
+			if (dragging && hasState("dragging"))
+				return "dragging";
+			
+			if (selected && down && hasState("downAndSelected"))
+				return "downAndSelected";
+			
+			if (selected && showsCaret && hasState("selectedAndShowsCaret"))
+				return "selectedAndShowsCaret";
+			
+			if (hovered && showsCaret && hasState("hoveredAndShowsCaret"))
+				return "hoveredAndShowsCaret";
+			
+			if (showsCaret && hasState("normalAndShowsCaret"))
+				return "normalAndShowsCaret"; 
+			
+			if (down && hasState("down"))
+				return "down";
+			
+			if (selected && hasState("selected"))
+				return "selected";
+			
+			if (hovered && hasState("hovered"))
+				return "hovered";
+			
+			if (hasState("normal"))    
+				return "normal";
+			*/
+			// If none of the above states are defined in the item renderer,
+			// we return null. This means the user-defined renderer
+			// will display but essentially be non-interactive visually. 
+			return null;
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden Methods
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @private
+		 */ 
+		override protected function commitProperties():void
+		{
+			super.commitProperties();
+			
+			if (setCurrentStateNeeded)
+			{
+				// setCurrentState(getCurrentRendererState(), playTransitions); 
+				setCurrentStateNeeded = false;
+			}
+		}
+		
+		/**
+		 *  @private
+		 */
+		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+		{
+			super.updateDisplayList(width, height);
+			
+			initializeRendererToolTip(this);
+		} 
+		
+		/**
+		 *  @inheritDoc
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function prepare(hasBeenRecycled:Boolean):void
+		{
+		}
+		
+		/**
+		 *  @inheritDoc
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function discard(willBeRecycled:Boolean):void
+		{
+		}
+		
+	}
 }
\ No newline at end of file
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableTextBase.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableTextBase.as
index 970ed2085..ca80e141f 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableTextBase.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableTextBase.as
@@ -1332,10 +1332,10 @@ public class SkinnableTextBase extends SkinnableComponent
      *  @playerversion AIR 1.5
      *  @productversion Royale 0.9.4
      */
-    /* public function get selectionActivePosition():int
+    public function get selectionActivePosition():int
     {
-        return textDisplay ? textDisplay.selectionActivePosition : -1;
-    } */
+        return 0; //textDisplay ? textDisplay.selectionActivePosition : -1;
+    }
 
     //----------------------------------
     //  selectionAnchorPosition
@@ -2021,16 +2021,16 @@ public class SkinnableTextBase extends SkinnableComponent
      *  @playerversion AIR 1.5
      *  @productversion Royale 0.9.4
      */
-    /* public function selectRange(anchorIndex:int, activeIndex:int):void
+    public function selectRange(anchorIndex:int, activeIndex:int):void
     {
-        if (!textDisplay)
-            return;
+        //if (!textDisplay)
+        //    return;
 
-        textDisplay.selectRange(anchorIndex, activeIndex);
+        // textDisplay.selectRange(anchorIndex, activeIndex);
 
         // This changes the selection so generate an UPDATE_COMPLETE event.
-        invalidateProperties();
-    } */
+        // invalidateProperties();
+    }
 
     /**
      *  @copy spark.core.IEditableText#selectAll()


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services