3 Replies Latest reply on Jun 7, 2008 2:23 PM by VarioPegged

    Rich Text Editor bug

    GSS1 Level 1
      Hello,

      My flex website at http://www.theplaygrounds.co.uk/The_Playground.swf throws the below error when I click on Contact or B/I/U on the Rich Text Editor.


      ReferenceError: Error #1069: Property string not found on mx.controls.RichTextEditor and there is no default value.
      at mx.validators::Validator/mx.validators:Validator::getValueFromSource()
      at mx.validators::Validator/validate()
      at mx.validators::Validator/::triggerHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()
      at mx.controls::RichTextEditor/__textArea_valueCommit()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()
      at mx.controls::TextArea/set text()
      at mx.controls::RichTextEditor/mx.controls:RichTextEditor::commitProperties()
      at mx.core::UIComponent/validateProperties()
      at mx.managers::LayoutManager/::validateProperties()
      at mx.managers::LayoutManager/::doPhasedInstantiation()
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.core::UIComponent/::callLaterDispatcher2()
      at mx.core::UIComponent/::callLaterDispatcher()

      What is actually the bug here?

      Also, on the contact page, I need to be able to scroll down for the submit button. How could I implement this? I've tried everything.

      Thanks
        • 1. Rich Text Editor bug
          VarioPegged Level 2
          It appears you're validating the input from the RTE, which is causing the error ... how are you validating the input?

          TS
          • 2. Re: Rich Text Editor bug
            GSS1 Level 1
            Hi,

            I have this code for validation:


            <mx:StringValidator
            id="nameValidator"
            source="{userName}"
            property="string"
            minLength="2"
            />

            <mx:StringValidator
            id="nameValidator1"
            source="{userComment}"
            property="string"
            minLength="2"
            />

            <mx:StringValidator
            id="nameValidator2"
            source="{userEmail}"
            property="string"
            minLength="2"
            />


            This acts on the contact form's forms, as these are the only textboxes in the web app.♠

            The contact form code:


            </mx:Canvas>
            <mx:Canvas label="Contact" width="100%" height="100%" verticalScrollPolicy="off" backgroundAlpha="0.7">
            <mx:Panel
            title="Feedback"
            left="10" top="10" right="10" bottom="10"
            layout="absolute"
            verticalScrollPolicy="on">



            <mx:Script>
            <![CDATA[
            import flash.events.MouseEvent;
            import mx.controls.Alert;

            private const NL:String = "\r";

            private function submitButtonClickHandler (event:MouseEvent):void
            {
            var userDetails:String = "You submitted the following details:" + NL + NL;
            userDetails += "Name: " + userName.text + NL;
            userDetails += "Email: " + userEmail.text + NL;
            userDetails += "Hide email? " + (hideEmail.selected ? "Yes" : "No") + NL + NL;
            userDetails += "Comment:" + NL + NL + userComment.text;

            Alert.show (userDetails);
            }

            private function emailButtonClickHandler (event:MouseEvent):void
            {
            var msg:String = "You can use the navigateToURL() method to open a URL"
            msg += " using a call similar to the following:\r\r";
            msg += "navigateToURL (new URLRequest ('mailto:comments@somewhere.com'));";

            Alert.show (msg);
            }

            ]]>
            </mx:Script>
            <mx:Panel
            title="Leave a comment"
            layout="absolute"
            width="523" height="573" x="10" y="10" backgroundColor="#E9ECE7" verticalScrollPolicy="on">
            <mx:Label text="Name:" x="10" y="12"/>

            <mx:TextInput id="userName" y="10" right="10" left="90"/>
            <mx:Label text="Email:" x="10" y="43"/>
            <mx:TextInput id="userEmail" y="41" right="10" left="90"/>
            <mx:Label text="Comment:" x="10" y="99"/>

            <mx:CheckBox
            id="hideEmail"
            y="76" left="90"
            label="Hide my email address"
            selected="true"
            />
            <mx:RichTextEditor x="90" y="126" title="Leave a comment" id="userComment" text="Leave A Comment" enabled="true" verticalScrollPolicy="auto">
            </mx:RichTextEditor>





            <mx:ControlBar x="120" y="258" horizontalAlign="center">
            </mx:ControlBar>
            <mx:Button
            id="submitButton" label="Submit"
            click="submitButtonClickHandler(event);"
            x="355" y="79" fontSize="10" fontWeight="bold" mouseDownEffect="{shrink}" mouseUpEffect="{revert}"
            fillAlphas="[0.0, 0.0, 0.0, 0.0]">
            </mx:Button>

            </mx:Panel>




            <mx:Script>
            <![CDATA[
            import flash.events.MouseEvent;
            import mx.controls.Alert;


            private function submitButtonClickHandler1 (event:MouseEvent):void
            {
            var userDetails:String = "You submitted the following details:" + NL + NL;
            userDetails += "Name: " + userName.text + NL;
            userDetails += "Email: " + userEmail.text + NL;
            userDetails += "Hide email? " + (hideEmail.selected ? "Yes" : "No") + NL + NL;
            userDetails += "Comment:" + NL + NL + userComment.text;

            Alert.show (userDetails);
            }


            ]]>
            </mx:Script>


            Apologies if this is a basic bug, as I am new to the Flex platform.

            Thanks for your help♠♠
            • 3. Re: Rich Text Editor bug
              VarioPegged Level 2
              Your StringValidators validate the text property on those controls, so change property to:
              property="text"

              TS