You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Mark Kessler (JIRA)" <ji...@apache.org> on 2013/04/21 00:33:15 UTC

[jira] [Resolved] (FLEX-18371) ListBase selectedIndex setter not dispatchEvent(new FlexEvent(FlexEvent.CHANGE));

     [ https://issues.apache.org/jira/browse/FLEX-18371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Kessler resolved FLEX-18371.
---------------------------------

    Resolution: Not A Problem
      Assignee: Mark Kessler

Tested with below app.  This is not a bug.  

Change event:  Dispatched when the selectedIndex or selectedItem property changes as a result of user interaction.
http://flex.apache.org/asdoc/mx/controls/listClasses/ListBase.html#event:change

valueCommit: Dispatched when values are changed programmatically or by user interaction.
http://flex.apache.org/asdoc/mx/core/UIComponent.html#event:valueCommit



<?xml version="1.0" encoding="utf-8"?>
<!---
   Test application
-->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               creationComplete="onCreate();"> 

    <fx:Script>
        <![CDATA[
            import mx.events.FlexEvent;
            import mx.events.ListEvent;
            import mx.collections.ArrayCollection;

            [Bindable]
            protected var items:ArrayCollection = new ArrayCollection(["one","two","three"]);

            protected function onCreate():void
            {
                list.addEventListener("change", onListChange);
                list.addEventListener("valueCommit", onValueCommit);
                list.selectedIndex = 0;
                list.selectedIndex = 1;
            }


            protected function onListChange(event:ListEvent):void
            {
                trace("change: " + event.target.selectedIndex);
            }


            protected function onValueCommit(event:FlexEvent):void
            {
                trace("valueCommit: " + event.target.selectedIndex);
            }

        ]]>
    </fx:Script>

    <s:layout>
        <s:VerticalLayout horizontalAlign="center" verticalAlign="middle" gap="0" />
    </s:layout>

    <mx:List id="list" dataProvider="{items}" />

</s:Application>

                
> ListBase selectedIndex setter not dispatchEvent(new FlexEvent(FlexEvent.CHANGE));
> ---------------------------------------------------------------------------------
>
>                 Key: FLEX-18371
>                 URL: https://issues.apache.org/jira/browse/FLEX-18371
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: List, mx: TileList
>    Affects Versions: Adobe Flex SDK 3.2 (Release)
>         Environment: Affected OS(s): Windows
> Affected OS(s): 
> Browser: Internet Explorer 7.x
> Language Found: English
>            Reporter: Adobe JIRA
>            Assignee: Mark Kessler
>
> Steps to reproduce:
> 1.tilelist.addEventListener(ListEvent.CHANGE,tileListItemChangeHandler);
> 2.tilelist.selectedIndex=1;
> 3.tilelist.selectedIndex=0;
>  
>  Actual Results:
> not Event dispatch
>  
>  Expected Results:
>  Event dispatch
>  
>  Workaround (if any):

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira