2 Replies Latest reply on Apr 24, 2006 3:43 AM by Digital_Hand

    Type mismatch in assignment statement

    Digital_Hand
      Hi all,

      Here my problem

      tcrComp1.method = method.selectedItem;

      In the left side::
      tcrComp1: an object of type TCRComponents
      method : is an attribute of type String

      In the right side::
      method : is a comboBox that includes an array of Strings like

      <mx:ComboBox id="method" width="50">
      <mx ataProvider>
      <mx:Array>
      <mx:String>post</mx:String>
      <mx:String>get</mx:String>
      </mx:Array>
      </mx ataProvider>
      </mx:ComboBox>


      I have tried to do the following

      tcrComp1.method = String(method.selectedItem);
      tcrComp1.method = method.selectedItem.toString;
      tcrComp1.method = (String)method.selectedItem;

      But all of them fail.
      Where is the problem.? and how can I fix it?

      Thanks in advance