Hi! I'm using binding in actionscript, not in mxml.
toni --- In [email protected], Sherif Abdou <[EMAIL PROTECTED]> wrote: > > why can't use just do > <mx:Binding source="<!--FIrst One-->" destination="<!--Second One-->"/> > <mx:Binding source="<!--Second One-->" destination="<!--FIrst One-->"/> > > > > ----- Original Message ---- > From: toniabc <[EMAIL PROTECTED]> > To: [email protected] > Sent: Thursday, January 17, 2008 12:20:19 AM > Subject: [flexcoders] Re: Binding ValueObjects > > I understand that. I know how to bind some class. Problem is, that if > I Bind whole VO to one of my components, if I change something in the > VO (only one var) than nothing will change. I don't want to bind all > the properties separately. > > I can make one example for drawing line: > > [Bindable] > public class LineVO > { > public var startX:Number; > public var startY:Number; > public var endX:Number; > public var endY:Number; > } > > Than I have one component to draw the line with LineVO. > > var linevo:LineVO= new LineVO(); > linevo.startX= 0; > linevo.startY= 0; > linevo.endX= 20; > linevo.endY= 30; > > var newLine:Line= new Line(); > newLine.vo=linevo; > addChild(newLine) ; > > I only want to bind the whole linevo, not the properties. > > Now if i change some properties like startX or startY, in the line > should be triggered one function that I bind to. > > It is working for me if I bind the every propertie by itself, like this: > > BindingUtils. bindProperty( newLine," onChange" ,linevo," startX"); > > That is not O.K., because than I have to bind everything manually. > > I hope that now somebody can help me. > > Thanks, > Toni > > --- In [EMAIL PROTECTED] ups.com, "madflexcoder" <brian.joseph31@ ...> > wrote: > > > > Put your [Bindable] tag on top of your class and it will make the > > entire class bindable. > > > > [Bindable] > > public class MyVo > > { > > > > } > > > > > > brian.. > > > > > > > > > > --- In [EMAIL PROTECTED] ups.com, "toniabc" <toniabc@> wrote: > > > > > > Hi! > > > > > > I have one problem. > > > > > > I have Value Object that I want to Bind to my custom made component. I > > > have no problems to bind every single value from VO to component. And > > > if I change something in the VO, that will be changed. > > > > > > But I want to Bind the whole VO (at once, not every value by itself). > > > So that I can override the whole VO and changes will be automatically > > > trigger the update function in my component. And if I remove the VO, > > > than I want to remove my component from view. > > > > > > Thank you, > > > Toni P. > > > > > > > > > > > ____________________________________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ >

