If you create the following three files and run the application, you'll see that the instance of TestComp with id of "ok" will trace out that foobar was set, but the instance of TestComp that's inside another custom component will not get set. This seems like a bug to me. Am I missing something?
//Main application:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:local="*">
<mx:Script>
<![CDATA[
[Bindable]
public var foo:String = "asdf";
]]>
</mx:Script>
<local:TestComp id="ok" foobar="{foo}"/>
<local:CustomComp>
<local:TestComp id="fails" foobar="{foo}"/>
</local:CustomComp>
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:local="*">
<mx:Script>
<![CDATA[
[Bindable]
public var foo:String = "asdf";
]]>
</mx:Script>
<local:TestComp id="ok" foobar="{foo}"/>
<local:CustomComp>
<local:TestComp id="fails" foobar="{foo}"/>
</local:CustomComp>
</mx:Application>
//TestComp:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<mx:Script>
<![CDATA[
public function set foobar( str:String ):void
{
trace( this + ": foobar was set: " + str );
}
public function get foobar():String
{
return "asdf";
}
]]>
</mx:Script>
</mx:Canvas>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<mx:Script>
<![CDATA[
public function set foobar( str:String ):void
{
trace( this + ": foobar was set: " + str );
}
public function get foobar():String
{
return "asdf";
}
]]>
</mx:Script>
</mx:Canvas>
//CustomComp:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
</mx:Canvas>
__._,_.___
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
</mx:Canvas>
--
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
| Software development tool | Software development | Software development services |
| Home design software | Software development company |
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___

