Flex :: Why Does TileList SelectedIndex Not Get Updated

Aug 14, 2009

In the code below, the presentedAlbumIndex is used to control the selectedIndex of the TileList. Item "five" is initially selected. Whenever the button is pressed the first item in the array is deleted, and the presentedAlbumIndex is decremented.

In theory, the selected index should stay with "five" every time the button is clicked (until "five" is itself deleted). It works this way for the first button press. However, on the 2nd button press the highlighting changes to "six" for some reason. Also, the TileList selectedIndex is always one behind.

I tried looking into ListBase and monitoring selectedIndex. It looks like the selectedIndex is updated initially to the correct index, but then it reverts back at some point to the correct index+1. I do not know why it's setting back.

It seems it's due to the fact that I am doing a data provider delete and index change in the same operation.

Is there some function in TileList I could override to keep selectedIndex up to date?

Steve

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"

[Code]....

View 1 Replies


Similar Posts:


Flex :: Unable To Bind The SelectedIndex Of A DropDownList To The SelectedIndex Member Of A Bindable Class

Feb 8, 2012

I am unable to bind the selectedIndex public property of a spark DropDownList to it's original source in the view's presentation model.

For the purposes of replicating this issue with as few lines as possible I have two views, and one presentation model. The code follows.

Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

[code]...

Debugging the application I find that selectedIndex in the presentation model always remains at the default value assigned regardless of which item I selected from the DropDownList. For the sample code above this is -1.How can I bind the selectedIndex in the presentation model such that it is updated appropriately when the selected item DropDownList changes?

View 1 Replies

Flex :: Set SelectedIndex For DownDownList?

Sep 26, 2010

I have an Array Collection as follows

var myArr:ArrayCollection = new ArrayCollection([
{label: "label1", data: "data1"},
{label: "label2", data: "data2"}]);

[Code]....

How to set the selected item for myDDL based on an item id(myID)? I tried something like:

selectedIndex = {myArr.getItemIndex(myID)}

View 1 Replies

Flex :: Getting SelectedIndex For SkinnableDataContainer / List?

Apr 9, 2010

Is there something like selectedIndex for SkinnableDataContainer? It doesn't seem to be one of the available properties.

View 2 Replies

Actionscript 3 :: Custom TileList Component FLASH CS5 - Built A Skin For A TileList

Sep 17, 2011

has anyone made a Custom Skin for a TileList component in Flash CS5. I want to change the scrollbar of the TileList, i want the track bar as just a thin white line and the thumb a orange circle, this for a Touch Interface.

View 1 Replies

Flex :: What's The SelectedIndex Value Of A Dropdownlist Control When A Prompt Text Is Set

Feb 3, 2011

When using a dropdownlist in flex I'd like to know the exact index value when the prompt is initialized in it.

View 1 Replies

Flex :: Make SelectedIndex Correspond To Selected Item In ComboBox?

Jun 21, 2010

Isn't there a better way to accomplish this?[code]...

All I want to do is make sure that when I update the item that the comboBox is pointing to internally, that it's selectedIndex also update so that the label within the ComboBox reflects the new value.

View 1 Replies

Flex :: Set SelectedIndex For Flex DownDownList?

Dec 27, 2008

I have an Array Collection as follows

myArr:ArrayCollection = new ArrayCollection([
{label: "label1", data: "data1"},
{label: "label2", data: "data2"}]);

[code]....

View 6 Replies

Flex :: Gui - Panel Not Being Updated?

Dec 29, 2009

I am drawing a cellular automaton simulation on a Flex Canvas. I alternate computing the state of the automaton with updating the graphics on the Panel. However, the updating of the Panel does not seem to be "keeping up" with the update of the CA state.

I'm wondering whether I am doing something wrong with my handling of the graphics code. The code is below. Sorry it's so lengthy, but I don't think the problem will happen with anything simpler (well, it probably will, but I'm not certain I want to take the time to find it).

[Code]...

View 1 Replies

Flex :: TileList Item Selection?

Sep 1, 2009

In my TileList, I want to select the TileList items on rollover, as opposed to the click event. I already have the TileList setup to allowMultipleSelection = "true".

View 3 Replies

Flex :: Referencing All Data In TileList

Sep 3, 2009

I have 2 TileList component in my Flex application. 1 tilelist is filled with data much like following xml sample:
<person name="Test">
<likes>Flex</likes>
<likes>PHP</likes>
</person>
<person name="test2">
[Code] .....
data shown is the preference.

The user can click the first tilelist and then the items that person "likes" should be selected in the second tilelist (in other words they lit up). Click event on my first tilelist
private function highlightPreferences(e:ListEvent):void{
trace(e.currentTarget);
//and now I'm stuck
}

View 1 Replies

Flex :: TileList With Associative Array?

Apr 7, 2010

I have an associative array that I want to display using TileList. However, it doesn't understand what is being fed to it. All I got is [object] in the TileList.

[bindable]
public var people as array = new array();
private function loadArray():void{

[code].....

View 1 Replies

Flex :: Highlight The First Item In The Tilelist?

Nov 3, 2011

I am navigating the items of tile list using next and previous button. I need to highlight the first item in the tilelist by default ( like the first item is being selected by default)

View 1 Replies

Flex :: How Content Dynamically Updated?

Jul 16, 2009

problem-1:In php we can easily move one page to another and easily use different type of function from those pages.In flex3 how i can use different type of .mxml pag

View 2 Replies

Flex :: Facebook Status Can Be Updated Through Air

Jan 25, 2010

Want to find out if facebook status can be updated through flex or air.

View 1 Replies

Flex :: Get Updated Array Length?

Mar 13, 2011

I am trying to get the length of an array through mxml (not actionscript). I have the following:

<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"

[Code].....

Why does test2 show the correct array length but test1 is stale?

View 2 Replies

Flex :: Datagrid Not Updated Properly?

Jul 19, 2011

I have two tables: Person {pID, pName, deptID} and Departments {deptID,deptName}An SQL statement like this gets me the name of a person and the department name:

SELECT pName, departments.deptName FROM people INNER JOIN people.deptID = departments.deptID;

The above works fine. I have a Flex DropDownList that is populated with deptNames. When I click the submit button, I am able to obtain the ID of the selected department without problem:

protected function button_clickHandler(event:MouseEvent):void
{
person.pName=pNameTextInput.text;
person.deptID=pDepartmentDropDownList.selectedItem.deptID; //ID of selected department obtained correctly.
if (person.pID == 0)

[code]....

From the comment above, I see that adding person will indeed add the attributes of the person object to the datagrid, except that one attribute is a foreign ID (deptID) from departments.

View 2 Replies

Flex :: Auto-sizing The Height Of A TileList?

Jul 21, 2009

Is there a way to have the TileList component to auto-size to its contents? I have tried setting it 100%, but it seems that won't help. I don't want to hard-code the height because the content will be vary, and I don't want scrollbars to show up.

View 2 Replies

Flex :: Label - External Data In TileList?

Mar 12, 2010

I'm working for the first time with a TileList and an itemRenderer and I'm having a bit of trouble getting the information from my array collection to display Here's what I've got

private function loadData():void{
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConn;[code].....

how I go about pulling the information from the array and putting it into labels like username, userjob, userbio ect, Inside the TitleList and itemRenderer.

View 1 Replies

Actionscript 3 :: TileList CreationComplete In Adobe Flex 3.0

Jul 3, 2010

I have made a tile list is Adobe Flex as follows

[Code]...

the problem is the creationComplete event is not fired for each PageImageRenderer, and it is fired only for the tiles visible at start so the rectangles drawn in initComponents() is only drawn for those tiles with valid values, and when I scroll to next row using scrollToIndex() function the rectangles are shown with previous values. and no initComponents() is called for these tiles? however the data.name, data.class are correctly displayed but not the rectangles, why it is so? What is the proper event against which I should call initComponents()?

View 1 Replies

Flex - PopUpButton With TileList And Custom Renderer?

Jul 25, 2010

I have prepared a simple test case for a PopUpButton opening a TileList with black and red entries and it mostly works, but has 2 annoyances. I've searched a lot, tried several variants (added [Bindable] members in my renderer; added color member to the bids array; created my public override set data() method; ...) and has been getting some answers too, but they are way too general.

1) Scrolling "tl2" right-left doesn't work well: the entries are displayed in a mix of red and black. I know the TileList reuses itemRenderer, but how do I fix the problem?

2) In debug-mode I get numerous warnings: warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)

[Code]...

View 1 Replies

Flex :: Setting The RowCount And ColumnCount In A TileList?

Sep 28, 2010

I'm using the TileList in a Flex 3 website. I need to set the rowCount and columnCount to factors of the total number of items in my array. For example, let's say that there are 15 items in my array. Then, I'd like to set the rowCount to 3 and the columnCount to 5 (3x5=15). Or if I had 16 items in the array, then I'd like to set the rowCount to 4 and the columnCount to 4 (4x4=16). The problem is that the length of the array varies. It's pulled from a database.

View 1 Replies

Flex :: Set Visibility Of An Item In A TileList To False?

Sep 28, 2010

I've got a tileList in a Flex 3 website. I want to programmtically turn off the visibility of a tile. So for example[code]...

View 2 Replies

Flex :: Creating A TileList With Canvases Which Are Drag-able?

Nov 24, 2010

I want to create a tilelist in which there would be different canvas or vbox etc, and i want to make them drag able.I wrote a code to do this, but the output does not shows anything in a list.

<mx:TileList width="1500" height="1000" dragMoveEnabled="true"
selectable="true" selectionColor="#FFFFFF"
dragEnabled="true" dropEnabled="true"

[code].....

View 1 Replies

Flex :: How To Identify A Selected Object In Tilelist

Apr 11, 2011

I have tilelist, which is dynamically loaded XML file with pictures,How do I do that would be when you click on a picture in the Label gave her name?

<mx:TileList id="tileList"
alternatingItemColors="[#FFFFFF,#EEEEEE]"
dataProvider="{xmlListColl}"

[code]......

View 1 Replies

Flex :: Datagrid Refresh When Dataprovider Is Updated?

Feb 22, 2010

i am working on an aplication using flex,adobe air...i have a datagrid with a XML as my dataprovider...during the execution of program my XML is updated....after XMl is updated and saved my datagrid should also get update..I have used Dataprovidername.refresh() method but it is not working.

View 4 Replies

Flex :: MovieClip Not Being Updated While Loading A File?

Nov 5, 2010

I have a MovieClip which is just a progress bar animation with about 100 frames. Then I load a zip file using a URLStreamLoader and subscribe to the ProgressEvent.PROGRESS event. After loading starts I receive notifications correctly and I set the bar's corresponding frame using gotoAndStop(). Everything seems to work fine except for the animation not being visually updated.

It seems that the scene won't refresh until the zip file is fully loaded.

View 1 Replies

Flex :: Cruisecontrol Dashboard Is Not Updated For The Project?

Apr 28, 2011

I setup Cruisecontrol to auto build a flex project every 1 hour using FlexAnt. The build itself works great - I can see when the project build fails/succeeds in the console perfectly well. But the cruisecontrol dashboard is not updated for the flex project.I have the sample connectfour project, and when it fails, I can see the red box for the project in the dashboard. This does not happen for my flex projects.

View 1 Replies

Flex :: Detect The Change In HSlider When Value Is Updated?

Jul 6, 2011

Is there a way to detect the value change in HSlider (in Flex 4.0) without touching the slider.Basically, what I wanted is to detect if the slider value was changed programmatically.

View 1 Replies

Flex :: Drag And Drop - Getting TileList Image Source

Aug 15, 2009

I have a TileList that's loaded with data from Flickr. The tilelist uses an imageRenderer to make a bunch of thumbnails. I'm trying to create a custom drag and drop function, but I want to get the image source of the tilelist mouseEvent target. Here's what the code looks like for the drag handler:

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved