From: Jonas Windey <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, October 17, 2006 4:39:01 PM
Subject: [flexcoders] Listen to changes of a bindable variable
Hi,
We’re using the riawave pattern (lightweight version of cairngorm), and I’m trying to listen to changes to our ModelLocator.
When I use a textfield that contains a direct reference to our model, everything is working fine:
<mycomp text=” {model.currentUser.name}” /> ..
Now I need to have a function that gets triggered when our model changes
We tried something like model.addEventListener(FlexEvent.DATA_CHANGE); but that gave no success.
Anyone know which event is being dispatched when a binded variable changes? Or is it not accessible?
The only other solution I see is using a getter and setter for every variable in our modellocator, and in the setter we could dispatch an event, but I want a cleaner solution.
Thanks for the tips!
|
Jonas Windey Web Developer T. +32 3 216 86 47
Pixco Interactive Division T. +32 3 216 86 40 F. +32 3 216 86 49
|