Hi Piotr,

after check example code, we have:

<j:ComboBox id="watchmenComboBox" dataProvider="{listModel.watchmen}">
                            ...
then NS:

<j:NumericStepper valueChange="watchmenComboBox.selectedIndex =
event.target.value" minimum="0" maximum="5"/>

and finally

<j:Label id="watchmenComboBoxResult" html=
"{describeItem(watchmenComboBox.selectedItem)}"/>

I think right now works as expected, since the change is programatic (is
not the user clicking in the combo list and selecting other item

So I think a bead should be better in this case, that takes care of this
behavior.

I'm interested in Alex response about how to handle it

Thanks Piotr for working on this

Carlos



El vie., 14 dic. 2018 a las 17:02, Piotr Zarzycki (<
piotrzarzyck...@gmail.com>) escribió:

> Hi Carlos,
>
> I have created issue [1] and branch [2] for problem with double dispatch
> "change" event.
> I have pushed changes when I'm removing from ArrayListSelectionModel
> dispatch of change event.
>
> Above action successfully fix however like I thought it's introduces
> another one which I would like to discuss how to fix. I have deployed
> temporary Tour De Jewel here [3] in order to show you and to others that
> issue.
>
> *New Issue:*
> When you go to ComboBox and try to change selectedIndex using
> NumericStepper it will successfully change selectedItem in ComboBox.
> Unfortunately label on the right sight of ComboBox won't be updated.
>
> *Question is:*
> How should be implemented discover of programmatic change of selectedIndex
> and selectedItem ?
>
> *I see following options:*
> 1) We should listen on events selectedIndexChanged/selectedItemChanged and
> dispatch "change" from components View bead. In this way we have to take
> into account places where "we" as a component setup those properties
> internally - In that case "selectedIndexChanged" and "selectedItemChanged"
> event shouldn't be dispatch.
>
> 2) Create separate bead which allows discover programmatic change of
> selectedIndex and selectedItem- cause not everyone wanted to have at all
> programmatic change event in the component - probably most of the cases
> will be opposite.
>
> What others think about that ?
>
> [1] https://github.com/apache/royale-asjs/issues/353
> [2]
>
> https://github.com/apache/royale-asjs/tree/bugfix/issue_353_double_dispatch_of_change_event_in_Jewel_List
> [3] http://transpiledactionscript.com/dev/royale/#
>
> Thanks,
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to