header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
terry
Points:0
Posts:0

4/4/2011 3:59:13 PM

Title: setSelectedIndices on list troubles


I am trying to debug a Flex 4 application by other developer(s). I need to set the selected indices for a list. I have a sub-class to do the work. I have tried all forms of commands to set selected indices but nothing actually writes, even setting selected indices to null. Here is some code:

import mx.core.mx_internal;
use namespace mx_internal;

trace ("last indices: " + _lastSelectedIndices_vector);
//trace shows the values in the vector (created and populated elsewhere)

trace ("current selected indices: " + selectedIndices);
//trace shows data provider currently selected indices values

mx_internal::setSelectedIndices (_lastSelectedIndices_vector, false);

trace ("new selected indices: " + selectedIndices);
//trace shows same values as current selected Indices (no change)

I have also tried:

selectedIndices = _lastSelectedIndices

and many other tweaked attempts. All to no avail. Documentation and many examples from the web show that this should work.

Please help me set selected indices!



1
RedBull
Points: 930
Posts:0
4/5/2011 12:49:04 AM



try passing a hard coded array to see if you are setting indices at the right place.

2
Wilbur
Points: 510
Posts:0
4/5/2011 1:18:49 AM



it seems that the indices are being set before its being actually populated.

3
Penguineer
Points: 0
Posts:0
4/5/2011 9:52:23 AM



Thanks for your thoughts. I tried assigning null and a fixed array but neither change the selected indices (for which values do already exist and can be read via trace just before and just after = same). Assigning the data provider happens elsewhere and is already done when this code runs.


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 7+8 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions