Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
Digital Hand #1
Type mismatch in assignment statement
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:dataProvider>
<mx:Array>
<mx:String>post</mx:String>
<mx:String>get</mx:String>
</mx:Array>
</mx:dataProvider>
</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
Digital Hand Guest
-
Type mismatch error
This query works fine on a live server using an MSSQL database: <cfquery name="qIndex" datasource="#appDSN#" username="shampoo"... -
Interface Type Mismatch
This works in Java, so it is not clear why Actionscript does not implement it the same way. If an instance of a class that implements an Interface... -
Type mismatch?
Hi i'm getting a type mismatch error, anyone tell me why pls? conn.Execute "DELETE FROM Bmemo WHERE (tDate <= '" & date() & "')" tDate is a... -
Type Mismatch
I'm at my wits end here. I am getting type mismatch error in a ASP page when I try to multiply decimals*integers. This shouldn't be this difficult.... -
Type Mismatch again
Hi, One page passes a strIssueNo to another, so on the 2nd page: Dim IssueNo IssueNo = Request.Item("strIssueNo") This 2nd page is designed... -
Andrew Spaulding #2
Re: Type mismatch in assignment statement
Is this in Flex 1.5 or Flex 2?
For flex 2 try the following code sample.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
private var myObj:Object;
[Bindable]
private var debug:String;
private function changeHandler( event:Event ):void
{
myObj = new Object();
myObj.method = event.target.selectedItem as String;
debug = myObj.method;
}
]]>
</mx:Script>
<mx:ComboBox id="method" width="50" change="changeHandler(event)">
<mx:dataProvider>
<mx:String>post</mx:String>
<mx:String>get</mx:String>
</mx:dataProvider>
</mx:ComboBox>
<mx:Label text="{ debug }" />
</mx:Application>
Andrew Spaulding Guest
-
Digital Hand #3
Re: Type mismatch in assignment statement
Andrew Spaulding , thanks for your replay.
I am using Flex 1.5 right now.
Digital Hand Guest



Reply With Quote

