I've removed my models and just have the ViewHelper. My field
validators are just bound directly to the controls rather than to the
<mx:Model>. What is best practice - locating validators in your
.mxml or programatically in you .as ViewHelper??
Dan
Dan Tropp wrote:
The book hasn't arrived yet...in the meantime.
Is it a good idea to bind your components to a Model and have the
ViewHelper use the Model (eg. myModel.foo), or are you better off just
having your ViewHelper subclass directly access the components (eg.
fooLabel.text)????
It feels like having the Model doesn't buy you anything - afterall the
ViewHelper is supposed to be the facade between the UI controls and
your
Commands.
I tried to use a Model and am having trouble trying to set values on
the
Model (to reflect them in the UI). I think I'm having trouble because
the binding from the controls to the Model is one-way, yes? Do you
need
two models - one bound inward and one bound outward (seems ugly)?
cheers
Dan
Yahoo! Groups Links
|