Question :
For the attached Flex Code, when I click on the label lb, I get the
following message at the runtime :
TypeError: Error #1123: Filter operator not supported on type
builtin.as$0.MethodClosure.
at deleteIt/init1()[C:\Users\dogra\Documents\Flex Builder
3\The_Vakeel\src\deleteIt.mxml:8]
at deleteIt/__lb_click()[C:\Users\dogra\Documents\Flex Builder
3\The_Vakeel\src\deleteIt.mxml:3]
Could someone help me with this?
Code :
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Label id="lb" text="check" click="init1()"/>
<mx:Script>
<![CDATA[
public function init1():void
{
lb.text =
this.width.toString().concat("-").concat.(this.height.toString());
}
]]>
</mx:Script>
</mx:WindowedApplication>
Answer :
Use +, not concat,
lb.text = this.width.toString() + "-" + this.height.toString();
For the attached Flex Code, when I click on the label lb, I get the
following message at the runtime :
TypeError: Error #1123: Filter operator not supported on type
builtin.as$0.MethodClosure.
at deleteIt/init1()[C:\Users\dogra\Documents\Flex Builder
3\The_Vakeel\src\deleteIt.mxml:8]
at deleteIt/__lb_click()[C:\Users\dogra\Documents\Flex Builder
3\The_Vakeel\src\deleteIt.mxml:3]
Could someone help me with this?
Code :
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Label id="lb" text="check" click="init1()"/>
<mx:Script>
<![CDATA[
public function init1():void
{
lb.text =
this.width.toString().concat("-").concat.(this.height.toString());
}
]]>
</mx:Script>
</mx:WindowedApplication>
Answer :
Use +, not concat,
lb.text = this.width.toString() + "-" + this.height.toString();
No comments:
Post a Comment