HI Lieven,
The way I usually do this is wrap the function I want to call with a setter
function. So for example lets say I have mx:Binding source={model.myValue}
destination=myValue /, I'd have a function:
private function set myValue(v:String) : void {
if(v != null) {
@yahoogroups.com
Subject: RE: [flexcoders] Binding a property to a function
Checkout
mx:Binding and function bindings from Chapter 37 in Part 5 of Flex 2
Developer Guide about Bindings.
and Observe/ObserveValue
http://weblogs.macromedia.com/auhlmann/archives/2006/09/using_binding_s.
cfm#more
The approach I have used in this case is the ChangeWatcher class
(mx.binding.utils)
---
// set up the watcher when the app loads
private function doInit():void
{
Hi Lieven,
Have a look at implicit getters and setters...
Brendan
On 1/26/07, Lieven Cardoen [EMAIL PROTECTED] wrote:
Is it possible to bind a property to a function... A bit like the
MVC-pattern…
When a property changes, a function should be triggered…
BindingUtils can't seem to
Checkout
mx:Binding and function bindings from Chapter 37 in Part 5 of Flex 2
Developer Guide about Bindings.
and Observe/ObserveValue
http://weblogs.macromedia.com/auhlmann/archives/2006/09/using_binding_s.
cfm#more
http://weblogs.macromedia.com/paulw/archives/2006/05/the_worlds_smal.cf
m
5 matches
Mail list logo