Hi,
 
In flex 2 you are obrigate to use a metatag [Bindable] like:
 
<![CDATA[
   [Bindable]
   public var labelText:String;
]]>

 
in flex 1.5 you also can you [Bindable] but this don't make diferences.
 
Another point to say is about static vars. Until now, in tha alpha version, you canot use you bindable, but the engeniers of macromedia are working to change this in the following vensions.
 
Bye...
 
On 1/17/06, Brendan Meutzner <[EMAIL PROTECTED]> wrote:
Hi All,

I'm sure this is going to be one of those questions that you regret
asking as soon as it leaves your mouth, because it seems so simple.
I'm having an issue binding 2 levels deep.  Something that does work
in Flex 1.5 doesn't work in Flex 2.  Below are 3 files for an example...

The value of "labelText" shows up properly in Child1.mxml , but does
not bind into Child2.mxml properly.  I have tried using
getters/setters with a Change event and Bindable property attached to
them with no luck. 


//MainApp.mxml -- passing initial value of labelText to first child
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*">
      <Child1 labelText="My Text" />
</mx:Application>



//Child1.mxml -- labelText binds properly
<mx:HBox xmlns:mx=" http://www.macromedia.com/2005/mxml" xmlns="*">
      <mx:Label text="my text first = {String(labelText)}" />
      <Child2 labelText="{String(labelText)}" />
      <mx:Script>
            <![CDATA[
                  public var labelText:String;
            ]]>
      </mx:Script>
</mx:HBox>


//Child2.mxml -- labelText does not bind proplery
<mx:HBox xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*">
      <mx:Label text="my text second = {String(labelText)}" />
      <mx:Script>
            <![CDATA[
                  public var labelText:String;
            ]]>
      </mx:Script>
</mx:HBox>


Thanks in advance for the help,

Brendan






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






--
Bruno Gustavo Martins
Mobile: (55)(11)9585-9587
[EMAIL PROTECTED]

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to