Hi,

this example work if I but this label

<j:Label text="selectedItem: {(cmb2.selectedItem as IconListVO).label}"/>

in the current position (below the HGroup that holds the ComboBox)

If I put the Label before the HGroup the binding is undefined.

This seems a bug in the binding system, and seems to be related to order of
declaration.

Or I could be missing something here?

Thanks!

Carlos







El mié., 19 sept. 2018 a las 17:24, <[email protected]> escribió:

> This is an automated email from the ASF dual-hosted git repository.
>
> carlosrovira pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>
>
> The following commit(s) were added to refs/heads/develop by this push:
>      new 1c7843b  ComboBox selectedItem example
> 1c7843b is described below
>
> commit 1c7843b524de55e8cb6e1c0d1b7fa142f78a639e
> Author: Carlos Rovira <[email protected]>
> AuthorDate: Wed Sep 19 17:24:23 2018 +0200
>
>     ComboBox selectedItem example
> ---
>  .../src/main/royale/ComboBoxPlayGround.mxml         | 21
> ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
>
> diff --git
> a/examples/royale/JewelExample/src/main/royale/ComboBoxPlayGround.mxml
> b/examples/royale/JewelExample/src/main/royale/ComboBoxPlayGround.mxml
> index 614d268..d8930a3 100644
> --- a/examples/royale/JewelExample/src/main/royale/ComboBoxPlayGround.mxml
> +++ b/examples/royale/JewelExample/src/main/royale/ComboBoxPlayGround.mxml
> @@ -25,6 +25,8 @@ limitations under the License.
>
>         <fx:Script>
>                 <![CDATA[
> +                       import vos.IconListVO;
> +
>              private function
> watchmenComboBoxSelectedItem(event:Event):void {
>                                 watchmenComboBoxResult.html =
> "<strong>ComboBox selectedItem:</strong> " + event.target.selectedItem;
>              }
> @@ -144,19 +146,32 @@ limitations under the License.
>                 </j:GridCell>
>
>         </j:Grid>
> +
>         <j:Grid gap="true" itemsVerticalAlign="itemsSameHeight">
> -
>                 <j:GridCell desktopNumerator="1" desktopDenominator="1"
>                                         tabletNumerator="1"
> tabletDenominator="1"
>                                         phoneNumerator="1"
> phoneDenominator="1">
> -
>                         <j:Card>
>                                 <html:H3 text="Jewel ComboBox
> selectedIndex: {cmb1.selectedIndex}"/>
>
>                                 <j:HGroup gap="3"
> itemsVerticalAlign="itemsCentered">
>                                         <j:ComboBox id="cmb1"
> labelField="label" dataProvider="{listModel.avengers}" selectedIndex="2"/>
>                                 </j:HGroup>
> -
> +                       </j:Card>
> +               </j:GridCell>
> +       </j:Grid>
> +
> +       <j:Grid gap="true" itemsVerticalAlign="itemsSameHeight">
> +               <j:GridCell desktopNumerator="1" desktopDenominator="1"
> +                                       tabletNumerator="1"
> tabletDenominator="1"
> +                                       phoneNumerator="1"
> phoneDenominator="1">
> +                       <j:Card>
> +                               <html:H3 text="Jewel ComboBox
> selectedItem"/>
> +
> +                               <j:HGroup gap="3"
> itemsVerticalAlign="itemsCentered">
> +                                       <j:ComboBox id="cmb2"
> labelField="label" dataProvider="{listModel.avengers}"
> selectedItem="{listModel.avengers.getItemAt(3)}" />
> +                               </j:HGroup>
> +                               <j:Label text="selectedItem:
> {(cmb2.selectedItem as IconListVO).label}"/>
>                         </j:Card>
>                 </j:GridCell>
>         </j:Grid>
>
>

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

Reply via email to