Hello,
I have a form with options and below it a preview, which should
reflect the changes in options immediately, so the user could see what
it wold look like with this set of options.
The preview is a custom comp, and i send it events with the options
data (Value object) so that it could update accordingly.

The only solution I could come up with was to bind the form data to
this Config object, and then to dispatch the event with this Config
data. I tried first the change handler, but at the moment the handler
is called, the binding didn't occur.
I tried to listen to propertyChange event (binding default trigger)
but it didn't work at all.
Then I came to ChangeWatcher.
I have a form item - checkbox, and a custom class property bound to it.

<mx:FormItem id="comItem">
<mx:CheckBox label="Allow Comments" id="comments"
selected="true"/>
<mx:CheckBox label="Tree Comments" id="treeComments"/>
</mx:FormItem>
I have set up a Change watcher to pass the bound object when the
checkbox value is changed.
ChangeWatcher.watch(comments,"selected",onBinding);
but my handler gets called twice, once when the event is a FlexEvent,
second when it's a MouseEvent..
I suppose It should get called only once.
If anyone knows a better solution on how to do what I want, i can use
it. But so far the watcher thing works, but the handler is called twice...

Reply via email to