No compiler warnings. I typically put [Bindable(event="foo")] on the
getter, and dispatch a foo in the setter, but in this case

>  [Bindable]
>  public var selectedGranularity:String;

is in a script block in the same MXML file as the combobox.

I had a breakpoint set on that variable declaration line, and the
stack crawl showed the setter getting called. Ah! I just realized the
problem. The value is the same so the event wasn't dispatched. I'm
trying to refresh a form after an update fails. The model class has
inner objects with refresh() functions, and the technique worked well
with other controls bound directly to model properties. I guess I'll
have to make the above variable reference the model instead. But if
there are other suggestions for forcing updates of views in general,
I'm all ears.

Or, I suppose I could make a custom setter and always dispatch.

>
> Does the setter have appropriate [Bindable] metadata?  Or are you getting
> warnings?
>
>
>
>  ________________________________
>
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Richard Rodseth
>  Sent: Thursday, May 01, 2008 10:57 PM
>  To: flexcoders@yahoogroups.com
>  Subject: [flexcoders] ComboBox binding
>
>
>
>
>
>
> ComboBox binding is driving me crazy.
>
>  [Bindable]
>  public var selectedGranularity:String;
>
>  <mx:ComboBox id="granularityCombo" dataProvider="{source}"
>  selectedIndex="{findSelectedIndex(this.selectedGranularity)}"
>  labelFunction="labelFunction" />
>
>  If I set a breakpoint on selectedGranularity, it's setter is reached,
>  but the findSelectedIndex function does not trigger. Any obvious
>  mistakes?
>
>  

Reply via email to