1 Reply Latest reply on Aug 12, 2010 8:48 AM by rtalton

    ReferenceError: Error #1069: Property DSPriority not found on String and there is no default value.

    flex4 Level 2

      Hi All

       

                        This is the Error where i got from my sample chatting application...

       

       

      ReferenceError: Error #1069: Property DSPriority not found on String and there is no default value.
      at mx.messaging::Producer/handlePriority()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messagi ng\Producer.as:190]
      at mx.messaging::Producer/internalSend()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messaging \Producer.as:169]
      at mx.messaging::AbstractProducer/send()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messaging \AbstractProducer.as:561]
      at SampleMessagin/sendMessage()[D:\FlexJavaPrograms\SampleMessagin\src\SampleMessagin.mxml:2 9]
      at SampleMessagin/___SampleMessagin_Button2_click()[D:\FlexJavaPrograms\SampleMessagin\src\S ampleMessagin.mxml:74]

       

       

       

                          this is the code

       

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
            currentState="{st}"
            creationComplete="consumer.subscribe()">


      <fx:Script>
        <![CDATA[
         import mx.messaging.events.MessageEvent;
         import mx.messaging.messages.AsyncMessage;
         import mx.messaging.messages.IMessage;
         import mx.modules.IModule;
         import mx.states.State;
        
         [Bindable]
         public var st:String="";
         public function changeStateHandler(event:Event):void
         {
          st = "Login"
         }
         //send message throug this method
         protected function sendMessage():void
         {
          var msg:IMessage = new AsyncMessage();
          msg.headers = uname.text;
          msg.body = sendText.text;
          producer.send(msg);
          sendText.text = " ";
         }
        //message  Handler  

         protected function consumer_messageHandler(event:MessageEvent):void
         {
          // TODO Auto-generated method stub
          var resp:IMessage = event as IMessage;
          dispText.text = resp.headers.toString()+" :: "+resp.body.toString()+"\n";
         }

        ]]>
      </fx:Script>


      <fx:Declarations>
        <s:Producer id="producer"
           destination="chat"/>
        <s:Consumer id="consumer"
           destination="chat"
           message="consumer_messageHandler(event)"/>
        </fx:Declarations>

      <s:states>
        <s:State name="State1"/>
        <s:State name="Login"/>
      </s:states>
      <s:Panel x="246" y="137" width="366" height="200" title="Login Here" includeIn="State1">
        <mx:HBox horizontalCenter="2" verticalCenter="-30">
         <s:Label text="Enter UR Name"/>
         <s:TextInput id="uname"/>
         <s:Button id="login" label="Login" click="changeStateHandler(event)"/>
        
        </mx:HBox>
      </s:Panel>

      <s:Panel includeIn="Login" x="327" y="78" width="353" height="369"  title="Welcome:{uname.text}">
        <s:TextArea x="6" y="11" height="222" width="335" id="dispText"/>
        <s:TextArea x="10" y="241" height="85" width="258" id="sendText"/>
        <s:Button x="276" y="241" label="Send" height="76" click="sendMessage()"/>
       
      </s:Panel>


      </s:Application>

       

       

       

      and my messaging-config.xml is as follows

       

       

       

                   <?xml version="1.0" encoding="UTF-8"?>
      <service id="message-service"
          class="flex.messaging.services.MessageService">

          <adapters>
              <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
              <!-- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/> -->
          </adapters>

          <default-channels>
              <channel ref="my-polling-amf"/>
          </default-channels>
         
          <destination id="chat"/>

       

      </service>

       

                        can any one help me what is the error present here.............

       

       

                           why it is showing error .. am i wrote anything wrong in this code .. please help me....