Tobias-

 I have just submitted this issue to the Flex team. Thanks!

-Mac

 


From: [email protected] [mailto:[email protected]] On Behalf Of tobiaspatton
Sent: Monday, March 13, 2006 4:34 PM
To: [email protected]
Subject: [flexcoders] Re: list.selectedIndices has the wrong values

 

One more strange thing: if I select "five" and then shift-
select "one", the selectedIndices attribute is correct.

--- In [email protected], "tobiaspatton" <[EMAIL PROTECTED]>
wrote:
>
> Hello list;
>
> I have a list with multiple selection turned on. When I examine
the
> selectedIndices attribute of the list, the values seem to be
> erroneous. For example, if my list looks like this:
>
> one
> two
> three
> four
> five
>
> I click on "one" and then shift-click on "two". At this point
> selectedIndices contains [1,2] when it should be [0,1]. If I click
> on "one" and shift-click on "five", selectedIndices contains
> [4,8,5,6,7] when it should contain [0,1,2,3,4]. Strangely,
> selectedItems contains the correct dataObjects. However, I want
> access to the item renderers, not the data objects, so this is not
> of no use to me.
>
> Using ctrl-click to create a multi-selection works fine. That is,
> the value of selectedIndices is correct when ctrl-click is used
> instead of shift-click.
>
> Here's small program to illustrate the problem:
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"
>       xmlns="*"
>       layout="absolute">
>      
>       <mx:List id="l1"
>             width="200"
>             multipleSelection="true"
>      
>       dataProvider="[ 'one', 'two', 'three', 'four', 'five' ]">
>      
>       </mx:List>
>       <mx:Button x="10" y="152"
>             label="Trace"
>             click="trace( l1.selectedIndices,
> l1.selectedItems )"/>
> </mx:Application>
>
>
> Thanks.
> Tobias.
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to