arraycollection

binding to arraycollection does not work

Hi, I am using flex SDK 3.5. I have model.as and in it i have an ArrayCollection (name it arr_mod) which is Bindable. From my mxml i link to this arr_mod in three places: 1) in DataGrid i set dataprovider={arr_mode} ... 2) in Button i add new item to the arr_mod this way: mx:Button .. click = "{arr_mod.addItem(new Item)}" 3) in textBox...

Flex: Problem with CollectionEvent on ArrayCollection

Hi there, got a reference to an arrayCollection and add event listener like this: collection.addEventListener(CollectionEvent.COLLECTION_CHANGE, onCollectionChange); that´s fine. Now some other component does have the same reference and is adding items to and removing items from that collection. Each time the handler is called: priv...

to change xml data to ArrayCollection

I have xml file with data as below and i want to convert this into Flex ArrayCollection including the id and name of the tags. I am using httpService to get the file. data.xml <data> <result month="Jan" value="0.666"> <info id="jan01Display" name="jhon" age="20" /> <info id="jan02Display" name="adams" age="24" /> <info ...

ArrayCollection loop through for matching items

Hi I hope someone can help me..... i am trying to build a dynamic form for a questionnaire module. Building on some previous posts I am using the process similar to that in question "http://stackoverflow.com/questions/629021/how-to-generate-a-formmxform-dynamically-in-flex" i have managed to prove out the fact of extending the XML to ...

How do i save a form to the database without knowing the field type or its id in flex and coldfusion?

Hi - I am working on a function to generate a form at runtime in Flex based on a call to the DB. The call to the DB returns the field types, id, tooltips etc as an arraycollection, the arraycollection is then parsed in order to ascertain what control to display based on the type field in the array - this bit works fine. However, i am st...

updating parts of a ArrayCollection

Hi, I have a ArrayCollection, containing a set of Value Objects. This ArrayCollection populates a DataGrid. I'm loading data into the ArrayCollection via a HTTPService call to the server. Once the first server call is made, I then start making repeated calls to the server to make sure I have the latest data (financial prices) shown in th...

How to access ArrayCollection Data

Hello guys. I know this one might be easy but I couldn't figure out. I have a List control that retrieve multiply data from Mysql. When a use clicks the data on List, The datagrid will display the data and the product image will show. I can see the multiply data shown in my dataGrid, but I don't know how to get the individual data show...

Sorting an array collection based on value of array in flex

Hey, I've been looking at sorting array collections. So far I've seen things like sorting numerically in ascending and descending order. What I'm looking for is to discover away to sort an arraycollection based on the order of values in another array. For Example: I have an array containing 10 numerical values. I also have an arraycol...

Populating an ArrayCollection property using [RemoteClass]

OK, 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: [RemoteClass(alias="test.PlanVO")] public class Plan { [SyncId] public var id:int; public var Name:String; } This works absolutely fine, unti...

How to search a string within a flex datagrid dataProvider 4?

Hello friends, I tried using filterFunction not get any results, check out this example: [Bindable] public var SearchLoadlistOneDP:ArrayCollection; public function SearchList():void { SearchLoadlistOneDP.filterFunction = filter; SearchLoadlistOneDP.refresh() } public function filter(item:Object):Boolean { var beginsWithStrin...

class object in class with php oop

I am not even sure how to ask. I do this all the time in C# but for the life of me I cannot find any decent examples in PHP. Can you help? What I am trying to do is for example. Say I have a class called Company who has many Employees. I want to be able to store all the employees in the company class then later when I iterate throug...

C# - Any clever way to get an int array from an object collection?

How can I create an easy helper method to get an int array from a collection of objects? The idea would be have a method which receive a collection of "User" class: public class User { public int UserId {get;set;} public string UserName {get;set;} } And filter this collection to get an int array of unique UserIds. List<int...

Flex 3 Using an ArrayCollection to Populate Both a Datagrid and a ComboBox

Hi, I use this arrayCollection to populate a Flex 3 Datagrid. I'd also like to use this arrayCollection to populate a comboBox with the Name node. In the arrayCollection, I've got the Name listed twice. I've got two rows in the Datagrid. If I set the ComboBox's labelfield to Name, then the Name will be listed twice in the ComboBox me...

How Can I Make a Flex 3 Datagrid Show only One Row of an ArrayCollection's Results?

Hi, Is there a way to make a Flex 3 Datagrid show only the first node of an arrayCollection, instead of showing all of the arrayCollection's data? myDGArray = [ {Name: "Judy", Talent: 'Pole-Dancing', Score: "40"}, {Name: "Jane", Talent: 'Yodelling', Score: "65"}, {Name: "Jim", Talent: 'Singing', Score: "82"} ...

Is it Possible to Call a Function When Building an Array?

Hi, Can I call a function when building an array in Flex 3? public function gridBuilder(myArray:Array):void { var i:uint; for (i=0; i<myArray.length; i++){ dGArray = [ {Name: myArray[i].name, Type: 'A:', Score: myArray[i].score, Rank: myArray[i].rank, Grade:(myFunction(myArray[i].ra...

Flex: ArrayCollection to XML conversion without SimpleXMLEncoder

Here are my functions for conversion: private function arrCol2XML(arrCol:ArrayCollection):XML { var xml:XML=new XML(<root></root>); for (var i:Number=0; i<arrCol.length; i++) { var obj:Object=arrCol.getItemAt(i); xml.appendChild(recursive(obj)); } return xml; } private function recursive(obj:Object, str:String='item'):XML { v...

Fastest way to get an Objects values in as3.

Ok, so I swear this question should be all over the place, but its not. I have a value object, inside are lots of getters/setters. It is not a dynamic class. And I desperately need to search an ArrayCollection filled with them. The search spans all fields, so and there are about 13 different types of VOs I'll be doing this with. I've t...

mx.collections missing? ArrayCollection() in Flex4 (Flash Builder 4)

I have some code that uses an ArrayCollection, it imports: import mx.collections.ArrayCollection; then: static protected var myAC:ArrayCollection = new ArrayCollection(); Seems straightforward, but in my project the import (and thus ArrayCollection) are not found/defined! I am using Flash Builder 4 (Flex 4) - it's an ActionScript ...

can I pass the Array values (not the array collection values) to the Bar charts or column charts using flex 3.5

Is there anyway where I can pass the Array values (not the array collection values) to the Bar charts or column charts using flex 3.5... here is the thing i want::: I have array values like this,, array1 = [23, 49, 40, 239, 20, 80, 39,49,120, 24, 31,41]; and i want to show these values on the Yaxis and months on Xaxis.... -- I ha...

doctrine2 ArrayCollection error

I am trying to follow the advice from the doctrine docs on this page - initialising a class member with the ArrayCollection. All works well for the example given in the docs. I'm trying to do it with an inherited class but get an error saying: Class Doctrine\Common\Collections\ArrayCollection is not a valid entity or mapped super class ...