Flex :: Find An ArrayCollection Item With A Specific Property Value?

Oct 14, 2009

I have some XML structures like this:

var struct:XML = <mh>
<mi id="1" stuff="whatever"/>

[Code]....

I wonder if items can be accessed in a similar way, like this:

var stuff:Object = cmenu['id == 2'].stuff;

View 8 Replies


Similar Posts:


Flex - Item's Depth In ArrayCollection?

Mar 21, 2010

is it somehow possible to get item's depth in ArrayCollection?

View 3 Replies

Actionscript 3 :: Change The Value Of An Item In A Flex ArrayCollection?

Nov 27, 2009

I have an ArrayCollection with values predefined. I want to assign a new value to items in the arrayCollection but can not figure out how. Basically I want to do something like this:acGuages.itemUpdated(0).thevalue = 90; (Changing the value from 25 to 90)

private var arrayGuages:Array=[
{thevalue:"25",height:"115"},
{thevalue:"45",height:"115"},

[code].....

View 1 Replies

Flex :: Edit ArrayCollection Through Item Renderer?

Jun 16, 2011

I use a spark List with a custom item renderer and an ArrayCollection for dataProvider.

The ItemRenderer looks something like

<mx:TextInput id="txtValue1" text="{data.myFirstValue}"/>
<mx:TextInput id="txtValue2" text="{data.mySecondValue}"/>

However, even though I change the text in txtValue1 or txtValue2, those are not actually changed in the object inside the ArrayCollection.

myFirstValue and mySecondValue are decorated with the [Bindable] tag.

My understanding is that if the text property is set to be bound a certain property, the changes should be automatically applied.

So the HACK (or so I think) that I use is to listen to the focusOut event of each textbox, and access the parent data provider and set the the values manually.

View 1 Replies

Flex :: Sorting - ArrayCollection Bubble Item Up Or Down By One Position?

Mar 22, 2010

I have an ArrayCollection where I want to be able to bubble items up or down by one position. What is the best way to do this?

View 2 Replies

Flex :: Display ArrayCollection In Group With An Item Render?

Jul 27, 2011

i got an Arraycollection which holds other arrays in it.i want to display the data inside with an item render but cant manage to do this
here is example code to explain my question

<s:DataGroup dataProvider="{news}"
itemRenderer="components.displaynews">

and this is the item render

<s:Label text="{data.??/}"/>

now what i dont understand is what comes after data? in the array collection the data goes like this : myArrayCollection->[0]->firstname

so when im binding data to item render,how do i represent the [x] to get to the specific name that i want? this obviusly wont work

<s:Label text="{data.[0].name/}"/>

and one more thing is what is the lightest way to display data in a listgroup with simple item render (image and text)

private function convertFBEventData2TreeData(eventData:Object):Object
{
var children:ArrayCollection = new ArrayCollection();[code].....

i dont know what to add after data, i tried many things but nothing work :

View 1 Replies

Flex :: Find The Number Of Properties In Any Element Of An ArrayCollection?

Nov 20, 2010

how do i find out the number of properties in any element of the ArrayCollection? The structure of the ArrayCollection wud be something like:

var arrColl:ArrayCollection = new ArrayCollection([{column1Data:"someData",column2Data:"someData"},{column1Data:"someData",column2Data:"someData",column3Data:"someData"},

[code]........

View 1 Replies

Flex :: Reverse Order Of ArrayCollection So That The Last Item Appears First In A ComboBox

Jan 26, 2011

Is there a way to reverse the order of the items in a comboBox? I'd like to use index numbers to refer to items in the arrayCollection below. I want the newest content to appear first in the comboBox. But, if I add something above the first item then all of the index numbers will be off by one. If I could add a new item to the end of the arrayCollection, but have it appear first in the comboBox drop down that would solve a lot of problems.

[Code]...

View 1 Replies

Flex :: Populating An ArrayCollection Property Using (RemoteClass)

Jul 13, 2010

I am passing a complex object from my .NET library to my Flex application via WebOrb.In order to automatically translate, I am using the [RemoteClass] meta data tag as follows:[code]This works absolutely fine, until I try to extend the Plan class to contain an array of complex items:[code]but the set function never gets called.What can I do to get the children into my Flex app in this way?

View 1 Replies

Flex :: ArrayCollection Detecting Duplicates By Property Value?

Nov 19, 2010

I'm curious of the best way to detect that an arraycollection contains duplicate objects as determined by an object's property value. For example, var _myArrayCollection:ArrayCollection = new ArrayCollection([{name: "name1", value: "value1"}, {name: "name2", value: "value2"}, {name: "name1", value: "value3"}]);Notice that this arraycollection has 3 items. 2 of the items have the same value for the name property. I would consider this a duplicate. Any ideas what the body of this method would look like? I have ideas but none of them feel very elegant.

View 3 Replies

Actionscript 3 :: Watching An ArrayCollection's Length Property In Flex?

Nov 12, 2009

I would like to put an eventListener on an ArrayCollection's length proprety, but I don't know how to go about this.

I want to do this because I only want code to execute when a certain number of things are in a certain ArrayCollection. I want Flex to wait to execute this code over the next object until that length property drops back to an acceptable level. I think I should do this with events instead of a while loop that sits there spouting NOOPs forever (which I don't know how to do either).

View 2 Replies

Flex :: Find The List Item Currently Under The Mouse Pointer?

Feb 3, 2010

I have some List and TileList controls. How can I get a reference to the list item that's currently under the mouse pointer?

View 3 Replies

Actionscript 3 :: Find The Index Of A Dropped Item In Flex?

Jul 14, 2011

How can I find the index of a item dropped into a list in flex using a spark list?

View 2 Replies

Flex :: Find Out Deselected Item In Spark List With Multiple Selection

Aug 3, 2010

In a spark list I could use the change event to find out which item has been selected or deselected. The dispatched IndexChangeEvent object has the properties newIndex and oldIndex holding this information.

But with multiple selection allowed this doesn't work anymore because newIndex and oldIndex could refer to indices of still selected elements.

A solution would be to copy the selectedIndices vector to another variable and compare this variable with selectedIndices after a change in selection, but this seems to be somewhat complex.

Does anyone know if there is an easy way two get the index/item a user is deselecting while other elements are still selected?

View 2 Replies

Actionscript :: Xml : Find Specific Xml Data By Attribute Name/value In Flex?

Feb 9, 2010

From some xml I want to find items that have a specific attribute and value.Here is example xml:

<node>
<node>
<node>
<special NAME="thisone"></special>

[code]....

View 2 Replies

Flex :: Handling Mouse Click 4 List To Find The Selected Item (since ItemClick Is Gone)?

Dec 8, 2011

I have prepared a simplified test case for my question. It will run instantly in your Flash Builder if you put the 2 files below into a project.I'm trying to display a List of strings and a confirmation checkbox in a popup:In the real application I dispatch a custom event with the string selected in the list, but in the test code below I just call trace(str);My problem: if I use click event, then the window closes, even if I click at a scrollbar (the !str check below doesn'twhen an item had been selected in previous use). And if I use change event, then the window doesn't close, when I click on the same item as the last time.riting a custom item renderer and having a click event handler for each item seems to be overkill for this case, because I have strings in the list.Test.mxml: (please click myBtn few times - to see my problems with click and change)

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

[code]........

View 3 Replies

Flex :: Adobe - Access A Property Of An Item Rendered

Jun 29, 2010

I have a datagrid with a combobox in it like;

[Code]..

Now when I want to access a function from the itemrendered/combobox i use parentApplication.funcName but what about accessing the other way, how can I access a property of the combobox from outside the itemrenderer? I tried myEditor2.pickState but it is now working

View 1 Replies

Flex :: Programmatically Changing MenuBar Item Toggled Property

Mar 22, 2011

I have this MenuBar control in Flex 3. How can I programmatically change the toggled property to false?
<mx:MenuBar labelField="@label" itemClick="itemClickHandler(event);" left="0" right="0" top="0" id="menuBar">
<mx:XMLList><menuitem label="File" data="top">
<menuitem label="New" data="file-new"/></menuitem>
<menuitem label="View" >
<menuitem label="Grid" type="check" toggled="true" data="view-grid"/>
</menuitem></mx:XMLList></mx:MenuBar>

View 1 Replies

ActionScript 3.0 :: Find Out Client Machine TimeZone In Specific Format Using Flex Date?

Sep 12, 2011

I have a requierement in my project that i need to store 'US/Eastern EST' and day light saving 'US/Eastern EDT'  in data base if client machine is in US/Eastern time zone. Because this gives clear identification instead of justing the chars like 'EST'. There is CDT in US region as well as Chaina too so can't relay just on three chars like 'EST'/'EDT'.

View 3 Replies

Actionscript 3 :: Get Item Value From An ArrayCollection?

Jul 18, 2011

I trying to read a value from an ArrayCollection, I use getItemAt and get an object:

masterData.getItemAt(0,0)

Then i use: masterData.getItemAt(0,0).toString(); and get:

<d>
<i>The value that I need</i>
</d>

Now How can I get the value in "< i >" tag?

View 2 Replies

ActionScript 3.0 :: Move An Item Within An ArrayCollection?

Oct 18, 2010

Is there any way to move an item from one position in an ArrayCollection to another without removing and then adding it? There's no setItemIndex function in ArrayCollection, but there is a CollectionEventKind.MOVE that can be dispatched in a CollectionEvent. Does anyone know how to get ArrayCollection or any of it's cousins to dispatch that event?

I'm using the item as a dataprovider to a listy thing that implements effects, and I want the list to reuse the same ItemRenderer instead of creating a new one.

View 0 Replies

Flex :: Binding To An Specific Property Of Objects In An Array?

Jul 22, 2009

I am using Flex to create a small form. All I have at the moment is a List component, that I want to populate with a list of font names.I am getting the fonts using Font.enumerateFonts(true);. This returns an array of flash.text.Font objects.

The Font objects have a fontName property that is a String of that fonts name.My problem is that I can't figure out how to bind the List's dataProvider to the fontName property of each of the Font objects in the Array.Is there a way to do this just with binding? and not creating a new array of Strings by looping through the Font objects?

View 1 Replies

Flex :: Mxml - Components Bound To Empty ArrayCollection At Load Time Don't Render As Expected When The ArrayCollection Is Updated?

Oct 27, 2009

I'm new to Flex and am using TileList bound to an ArrayCollection. The array collection is empty at load time, and then updates with the results from am HTTPService call. The problem is that the item renderers aren't being rendered as expected, I'm guessing because there was no data when they were first rendered at load time. Here's simplified example:

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

[code].....

View 2 Replies

Android :: Retrieve Objects Item Information From ArrayCollection?

Aug 26, 2011

I am currently using the latest verion of Adobe Flash Builder to create a Mobile Application. For the application one feature is to allow the users to bookmark content an this is done by storing the id of the object to be Bookmarked into an SQLite db on the device. This part has been done successfully and they are stored fine.

Now what I want to do is to pull back the bookmarked id's from the database and pass them to a WebService call which needs to be made to an External Database. When I retrieve the Bookmark id's from the local database they are contained within object, I now need to find a way to take the id's from the database objects in the ArrayCollection and store them in a new array that will be passed to the WebService, as the webservice is expecting an Array of Int's and not Objects. Below is the code I created to see if the object items are within the array list of objects:

private function loop():void
{
var index:int;

[Code]....

View 1 Replies

ActionScript 3.0 :: Populating An ArrayCollection Property Using [RemoteClass]

Jul 13, 2010

I am passing a complex object from my .NET library to my Flex application via WebOrb. In order to automatically translate, I am using the [RemoteClass] meta data tag as follows:

ActionScript Code:
[RemoteClass(alias="test.PlanVO")]
public class Plan
{

[Code].....

but the set function never gets called.

What can I do to get the children into my Flex app in this way?

View 1 Replies

ActionScript 2.0 :: Find The Value Of The An Item In An Array?

Jan 15, 2011

i am tring to check the values imn my array but for some reason the hit is never trace. So is the value o0f cat not found in the array. if not what do i do to find the value cat

ActionScript Code:
var  numbers_array = new Array("cat");
for( i =0; i < numbers_array.length; i++){

[Code]......

View 8 Replies

ActionScript 2.0 :: Find Item In Multi-Array?

Apr 19, 2011

I'm trying to determine if an object exists in a multidimensional array.I found this code:

Code:
contains = function (input, arrayData) {
for (i=0; i < arrayData.length; i++) {

[code].....

View 3 Replies

Flash 10 :: Find Where An Item In Library Is Used On Stage?

Oct 22, 2010

Is there a way to find the location a clip in the library is used?

View 0 Replies

ActionScript 2.0 :: Find Object/Item In Array?

Apr 19, 2011

I'm trying to determine if an object exists in a multidimensional array.I found this code:

Code:
contains = function (input, arrayData) {
for (i=0; i < arrayData.length; i++) {

[code]....

View 0 Replies

ActionScript 2.0 :: Find Listbox Top Item's 'itemIndex Value'?

Jan 18, 2007

I am working with the listbox component and trying to find out the index of the top item that is displaying.Obviously this is 0 by default but if the scrollbar has moved down then this will change, I just can't find out how to get the value!

View 1 Replies







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