I agree about the getter. But the setter is triggered after this line
comboValue
= _item.value;


On Mon, Nov 18, 2013 at 11:30 AM, Kessler CTR Mark J <
mark.kessler....@usmc.mil> wrote:

> I believe this is not sending change events for your getter... based on it
> not having a setter that is being triggered.
>
> -Mark
>
> -----Original Message-----
> From: mark goldin [mailto:markzolo...@gmail.com]
> Sent: Monday, November 18, 2013 12:15 PM
> To: users
> Subject: Re: Combo box and binding
>
> I tried setting a setter to be Bindable, it did not help.
>
>
> On Mon, Nov 18, 2013 at 11:09 AM, Mark Line <markl...@gmail.com> wrote:
>
> > I think you need the Bindable meta tag on the set function of the getter
> > and setter. i'm not in front of flash builder to test though...
> >
> >
> > On 18 November 2013 16:57, mark goldin <markzolo...@gmail.com> wrote:
> >
> > > BindingUtils.bindProperty(combobox, "comboValue", model, "field",
> true);
> > >
> > > Here is my relative combobox code:
> > > private var _comboValue:*;
> > > public function set comboValue(value:*):void
> > > {
> > >  // simplified
> > > for each (var listItem:* in dataProvider){ if (listItem.value] ==
> > > _comboValue){ selectedItem = listItem; break; } }
> > > }
> > > [Bindable]
> > > public function get comboValue():*
> > > {
> > > return _comboValue;
> > > }
> > > addEventListener(IndexChangeEvent.CHANGING, onChange, false, 0, true);
> > >
> > > private function onChange(event:IndexChangeEvent):void
> > > {
> > >    if (selectedIndex > -1)
> > >      comboValue = selectedItem.value;
> > >    else  // new item
> > >    {
> > >         var _item:Object = new Object();
> > > _item.value = textInput.text;
> > > comboValue = _item.value;
> > > ArrayCollection(dataProvider).addItemAt(_item, 0);
> > >    }
> > > }
> > >
> > > When I add a new item the underlying model is not getting the new value
> > and
> > > I have to manually assign to it:
> > > model.field = combobox.selectedItem["value"];
> > >
> > > Any idea?
> > >
> > > Thanks
> > >
> >
>

Reply via email to