|
You can put [ChangeEvent]s on methods too. If you have a method getTotal() that internally uses a number of objects to compute a total you can place setters for those properties then dispatch an event to indicate that the total should be recalculated.
[ChangeEvent("computeTotal")] function getTotal() { return numA + numB + numC; }
function set numA(a) { _numA = a; dispatchEvent({type: "computeTotal"}); }
etc.
Matt -----Original Message-----
I find myself using executeBindings() more and more. The pattern is usually when I use an AS object, that I developed, as the underlying model of a component and the binding is a method call on this object. Not really sure how to "reorganize" my objects as I am not doing anything convoluted. Is there a better pattern?
I also found that executeChildBindings() doesn't seem to do anything, but it may be just my use of it. What is the difference between the two methods?
-S
You shouldn't need to call executeBindings() except in
extreme |
- RE: [flexcoders] When to use executeBindings() ? Elliot Winard
- RE: [flexcoders] When to use executeBindings() ? Elliot Winard
- RE: [flexcoders] When to use executeBindings() ? jeff tapper
- RE: [flexcoders] When to use executeBindings() ? Steve Pruitt
- Matt Chotin

