 */
 package weave.ui
 {
-	import flash.events.FocusEvent;
-	
-	import mx.controls.TextInput;
-	import mx.core.mx_internal;
-	
+	import flash.events.FocusEvent;
+	
+	import mx.controls.TextInput;
+	import mx.core.mx_internal;
+	import mx.utils.ObjectUtil;
+	
 	import weave.compiler.StandardLib;
 
 	use namespace mx_internal;

		/**
		 * This function hides the prompt if it is shown, and selects all if autoSelect is true.
		 */
		protected function captureFocusIn(event:FocusEvent):void
		{
			_hasFocus = true;
			hidePrompt();
			
			if (autoSelect)
			{
				selectionBeginIndex = 0;
				selectionEndIndex = text.length;
			}
		}
		
		/**
		 * This function makes the prompt reappear if the text is empty.
		 */
		protected function captureFocusOut(event:FocusEvent):void
		{
			_hasFocus = false;
			if (!text)
				showPrompt();
		}
		
		/**

				super.text = newText;
				
				updateTextColor();
				
				// Validate now to make sure the inner UITextField text is updated as well.
				// This fixes a bug where the prompt text would remain if a character is typed
				// immediately after clicking in the text input.
				validateNow();
			}
		}
		
