      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function textView_changeHandler(event:TextOperationEvent):void
+    private function textDisplay_changeHandler(event:TextOperationEvent):void
     {        
-        //trace(id, "textView_changeHandler", textView.text);
+        //trace(id, "textDisplay_changeHandler", textDisplay.text);
         
         // Redispatch the event that came from the RichEditableText.
         dispatchEvent(event);

     */
    public function appendText(text:String):void
    {
        if (!textView)
            return;

        // Make sure all properties are committed (i.e. pushed down to textView)
        // before doing the append.
        validateNow();

        textView.appendText(text);
    }
    
    /**
     *  @private
     *  Copy values stored locally into textView now that textView has been
     *  added.
     */
    private function textViewAdded():void
    {        
        var newTextViewProperties:uint = 0;
        
        if (textViewProperties.autoSize !== undefined)
        {
            textView.autoSize = textViewProperties.autoSize;
            newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), AUTO_SIZE_PROPERTY_FLAG, true);
        }

        if (textViewProperties.content !== undefined)
        {
            textView.content = textViewProperties.content;
            newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), CONTENT_PROPERTY_FLAG, true);
        }
 
        if (textViewProperties.displayAsPassword !== undefined)
        {
            textView.displayAsPassword = textViewProperties.displayAsPassword
            newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), 
                DISPLAY_AS_PASSWORD_PROPERTY_FLAG, true);
        }

        if (textViewProperties.editable !== undefined)
        {
            textView.editable = textViewProperties.editable;
             newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), EDITABLE_PROPERTY_FLAG, true);
        }

        if (textViewProperties.heightInLines !== undefined)
        {
            textView.heightInLines = textViewProperties.heightInLines;
             newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), 
                HEIGHT_IN_LINES_PROPERTY_FLAG, true);
        }

        if (textViewProperties.imeMode !== undefined)
        {
            textView.imeMode = textViewProperties.imeMode;
             newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), IME_MODE_PROPERTY_FLAG, true);
        }

        if (textViewProperties.maxChars !== undefined)
        {
            textView.maxChars = textViewProperties.maxChars;
             newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), MAX_CHARS_PROPERTY_FLAG, true);
        }

        if (textViewProperties.maxWidth !== undefined)
        {
            textView.maxWidth = textViewProperties.maxWidth;
             newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), MAX_WIDTH_PROPERTY_FLAG, true);
        }

        if (textViewProperties.restrict !== undefined)
        {
            textView.restrict = textViewProperties.restrict;
             newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), RESTRICT_PROPERTY_FLAG, true);
        }

        if (textViewProperties.selectable !== undefined)
        {
            textView.selectable = textViewProperties.selectable;
             newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), SELECTABLE_PROPERTY_FLAG, true);
        }

        if (textViewProperties.selectionVisibility !== undefined)
        {
            textView.selectionVisibility = textViewProperties.selectionVisibility;
             newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), 
                SELECTION_VISIBILITY_PROPERTY_FLAG, true);
        }
            
        if (textViewProperties.text != null)
        {
            textView.text = textViewProperties.text;
            newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), TEXT_PROPERTY_FLAG, true);
        }

        if (textViewProperties.widthInChars !== undefined)
        {
            textView.widthInChars = textViewProperties.widthInChars;
             newTextViewProperties = BitFlagUtil.update(
                uint(newTextViewProperties), 
                WIDTH_IN_CHARS_PROPERTY_FLAG, true);
        }
            
        // Switch from storing properties to bit mask of stored properties.
         textViewProperties = newTextViewProperties;    
    }
    
    /**
     *  @private
     *  Copy values stored in textView back to local storage since textView is
     *  about to be removed.
     */
    private function textViewRemoved():void
    {        
        var newTextViewProperties:Object = {};
        
        if (BitFlagUtil.isSet(uint(textViewProperties), AUTO_SIZE_PROPERTY_FLAG))
            newTextViewProperties.autoSize = textView.autoSize;

        if (BitFlagUtil.isSet(uint(textViewProperties), CONTENT_PROPERTY_FLAG))
            newTextViewProperties.content = textView.content;
 
        if (BitFlagUtil.isSet(uint(textViewProperties), 
            DISPLAY_AS_PASSWORD_PROPERTY_FLAG))
        {
            newTextViewProperties.displayAsPassword = textView.displayAsPassword;
        }

        if (BitFlagUtil.isSet(uint(textViewProperties), EDITABLE_PROPERTY_FLAG))
            newTextViewProperties.editable = textView.editable;

        if (BitFlagUtil.isSet(uint(textViewProperties), 
            HEIGHT_IN_LINES_PROPERTY_FLAG))
        {
            newTextViewProperties.heightInLines = textView.heightInLines;
        }

        if (BitFlagUtil.isSet(uint(textViewProperties), IME_MODE_PROPERTY_FLAG))
            newTextViewProperties.imeMode = textView.imeMode;

        if (BitFlagUtil.isSet(uint(textViewProperties), 
            MAX_CHARS_PROPERTY_FLAG))
        {
            newTextViewProperties.maxChars = textView.maxChars;
        }

        if (BitFlagUtil.isSet(uint(textViewProperties), 
            MAX_WIDTH_PROPERTY_FLAG))
        {
            newTextViewProperties.maxWidth = textView.maxWidth;
        }

        if (BitFlagUtil.isSet(uint(textViewProperties), RESTRICT_PROPERTY_FLAG))
            newTextViewProperties.restrict = textView.restrict;

        if (BitFlagUtil.isSet(uint(textViewProperties), 
            SELECTABLE_PROPERTY_FLAG))
        {
            newTextViewProperties.selectable = textView.selectable;
        }

        if (BitFlagUtil.isSet(uint(textViewProperties), 
            SELECTION_VISIBILITY_PROPERTY_FLAG))
        {
            newTextViewProperties.selectionVisibility = 
                textView.selectionVisibility;
        }
            
        // Text is special.            
        if (BitFlagUtil.isSet(uint(textViewProperties), TEXT_PROPERTY_FLAG))
            newTextViewProperties.text = textView.text;

        if (BitFlagUtil.isSet(uint(textViewProperties), 
            WIDTH_IN_CHARS_PROPERTY_FLAG))
        {
            newTextViewProperties.widthInChars = textView.widthInChars;
        }
            
        // Switch from storing bit mask to storing properties.
        textViewProperties = newTextViewProperties;
    }
    
    //--------------------------------------------------------------------------

     */
    override public function set maxWidth(value:Number):void
    {
        if (textDisplay)
        {
            textDisplay.maxWidth = value;
            textDisplayProperties = BitFlagUtil.update(
                uint(textDisplayProperties), MAX_WIDTH_PROPERTY_FLAG, true);
        }
        else
        {
            textDisplayProperties.maxWidth = value;
        }

        invalidateProperties();            
