package
{
import mx.containers.HBox;
public class MyComp extends HBox
{
private var __months:Array;
public function get months():Array
{
return __months;
}
public function set months(monthArray:Array):void
{
trace("the value is getting set");
__months = monthArray;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
[Bindable] public var anotherArray:Array = [{x:1}];
]]>
</mx:Script>
<ns:MyComp months="{anotherArray}" xmlns:ns="*"/>
</mx:Application>
Hi,
I've got a custom class. The class has a getter/setter method for variable called months
Class MyComp extends HBox
{
private var __months:Array;
public function get months():Array
{
return __months;
}
public function set months(monthArray:Array):void
{
Trace("the value is getting set");
__months = monthArray;
}
}
I try set the value with an mxml tag
<ns:MyComp months="{anotherArray}" />
If I do this I get no trace from the setter method
<ns:MyComp months="anotherArray" />
If I do this I get the trace and the variable is set to the String "anotherArray" which should throw a runtime type error since the variable is Array
I'm pretty confused… worked fine in Beta 3
Regards,
Martin
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.5/377 - Release Date: 27-06-2006
--
Jason __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
Reply via email to