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], "madflexcoder" <[EMAIL PROTECTED]>
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], "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.
> >
>


Reply via email to