It’s a bug that we have fixed internally.  Next release.

 

Matt

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tom Bray
Sent: Sunday, October 01, 2006 5:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Binding bug?

 

If I wait until the application's creationComplete event fires to set foo, then the binding is executed in the nested TestComp, so I'll backtrack from thinking this is a bug but I still think the behavior below is unexpected, at least for me.  What confuses me is that if I nest the TestComp inside a plain old Canvas, the binding executes, but when I'm nesting it inside a component that extends Canvas, it doesn't.  Can anyone explain what's going on here?

Thanks,

Tom

On 10/1/06, Tom Bray <[EMAIL PROTECTED]com> wrote:

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>
 

 

//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>

 

//CustomComp:

<?xml version="1.0" encoding="utf-8"?>
<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

__,_._,___

Reply via email to