Hi Grant
Can't you use a binding function?
dataProvider="{ massageData( ModelLocator.getInstance().myData ) }"
Cheers
Ralf.
On 2/17/07, Gareth Edwards <[EMAIL PROTECTED]> wrote:
Why not define an as class for your model (if you aren't already), and
define a separate variable that you can populate on the other data being
set?
The snippet I posted is from something I've done that looks like this....
public function set jobs (data:ArrayCollection) : void
{
_jobs = data;
buildJobsTree(_jobs);
}
Not sure if its the best option.. but it certainly works for me.
Either that, or there are some observer classes from Adobe Consulting that
allow you to watch changes to your model from the UI.
Cheers
Gareth.
Grant Davies wrote:
Thanks gareth..
the model is used by multiple views, a grid and a chart, the chart needs
the xml from the model manipulated a little differently than the grid
does...
grant
...........................................
*› b l u e t u b e i n t e r a c t i v e.*
.: grant davies
.: 404.428.6839 (c)
.: 708-983-1577 (F)
› [EMAIL PROTECTED]
› http://www.bluetube.com/bti
› A Tribal Chicken Designs Affiliate <http://www.tribalchicken.com/>
------------------------------
*From:* [email protected]
[mailto:[email protected]<[email protected]>]
*On Behalf Of *Gareth Edwards
*Sent:* Saturday, February 17, 2007 4:32 PM
*To:* [email protected]
*Subject:* Re: [flexcoders] observing a model change in cairngorm
Why not use a setter in your model and do the work there?
public function set jobs (data:ArrayCollection) : void
{
// Custom logic here?
_jobs = data;
}
Cheers
Gareth.
Grant Davies wrote:
Hi guys, I've got my view, model, commands and delegate all running and my
view contains a chart.
When the model changes for my chart data I need to work the data a little
and can't just directly use the binding.
do I
1) change my command to fire an event when the model has been updated
2) Is there some way I can observe a model change and then kick of my
"data work" a little and not directly bind the chart to the model ?
Grant
...........................................
*› b l u e t u b e i n t e r a c t i v e.*
.: grant davies
.: 404.428.6839 (c)
.: 708-983-1577 (F)
› [EMAIL PROTECTED]
› http://www.bluetube.com/bti
› A Tribal Chicken Designs Affiliate <http://www.tribalchicken.com/>
--
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35

