Hi!

I've created a simple custom component called MyVBox. It is very
simple but it defeats the data binding.

When I execute the main.mxml in the first block where I use mx:VBox
every data binding is OK, but in the second block my other custom
component FormBeta isn't binded. The standard TextInput's data binding
is working in the second block too so my FormBeta's properties'
bindings are bad.

Does anybody knows what I'm doing wrong?

--- main.mxml ---

<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
        xmlns:mx="http://www.adobe.com/2006/mxml"; 
        xmlns:local="*" 

        layout="vertical" 
>

        <mx:TextInput id="ppp1" text="this is ppp1" />
        
        <!-- First block -->
        <mx:VBox>
                <mx:TextInput id="ppp2" text="this is ppp2" />
                <local:FormBeta kola="{ppp1.text}" coke="{ppp1.text}"/>
                <local:FormBeta kola="{ppp2.text}" coke="{ppp2.text}"/>
                
                <mx:TextInput text="{ppp1.text}"/>
                <mx:TextInput text="{ppp2.text}"/>
        </mx:VBox>
        
        <!-- second block -->
        <local:MyVBox>
                <mx:TextInput id="ppp3" text="this is ppp3" />
                <local:FormBeta kola="{ppp1.text}" coke="{ppp1.text}"/>
                <local:FormBeta kola="{ppp3.text}" coke="{ppp3.text}"/>
                
                <mx:TextInput text="{ppp1.text}"/>
                <mx:TextInput text="{ppp3.text}"/>
        </local:MyVBox>
</mx:Application>


--- FormBeta.mxml ---

<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml";>
        <mx:Script>
                <![CDATA[
                        import mx.events.FlexEvent;

                        [Bindable]
                        public var kola: String;
                        
                        private var _kola: String;
                        
                    [Bindable("valueCommit")]
                    public function get coke():String
                    {
                                return _kola;
                    }
                
                    public function set coke(value:String):void
                    {
                        trace("set coke " + value);
                        _kola = value;
                
                       dispatchEvent(new FlexEvent("valueCommit"));
                    }
                ]]>
        </mx:Script>
        
        <mx:Text text="kola: {kola}"/>
        <mx:Text text="coke: {coke}"/>
</mx:HBox>
 

--- MyVBox.mxml ---

<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml";>
        
</mx:VBox>



Thanx,
 nOR






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to