arraycollection

Flex looping through object

Im trying to extend flex ArrayCollection to be able to search for an object containing specific data and give it back. Here is my function: public function getItemContaining(value: String): Object { //Loop through the collection for each(var i: Object in this) { ...

Flex XML dynamic type

I have an application which receives dynamic XML data from a server. The structure of the XML is dynamic and the tags/attribute names cannot be predicted. NO row items can be hardcoded. The data is coming back from a database (imagine columns and rows), and the type of the data is known on the server side. The following is just an ex...

How to get the memory size of an ArrayCollection in Flex

I have built an image cache which is an ArrayCollection containing images. I have built functionality so that the cache can hold a max of 250 images. However, the images can be of a different size, so it's better to limit the total memory size of all images in the ArrayCollection. Does anyone know how I can get the total memory size o...

Flex AdvancedDataGrid AdvancedDataGridRendererProvider childrenField ArrayCollection - Question about behaviour

Hi, I have a main class ClassA that has a bunch of "normal" properties that are simple datatype like ints, strings, etc. It also has one property ("childItems") that is an ArrayCollection of ClassB. I am using an ArrayCollection of ClassA as the source for an hierarchical data provider for an AdvancedDataGrid. I set the childrenField t...

Load Content into TextInput Flex?

I've got content coming into my application using a query and an ArrayCollection. I know how to display the content into a DataGrid by using the dataProvider propriety, but I'd like to use TextInput components and drop the DataGrid altogether. Does anyone have any examples or information on how I would go about doing this? Thanks! Tha...

[Flex 3] Updating runtime created arraycollections, they all have the same source

Hello. I have a source collection (now a simple Array). At run-time I create ArrayCollections using the same array as the source (each collection show the same source, but they are differently filtered). My problem is, when a new item added to the source, the already created arraycollections wont updated if one of the property of this n...

Flex: How can I Make changes to an ArrayCollection bound to data grid live?

Hi guys, I have an ArrayCollection bound to an editable DataGrid, another component needs to know when the ArrayCollection changes (as a result of changes in the DataGrid) so it can also update itself, so is listening to the COLLECTION_CHANGE event of the ArrayCollection. The problem is that the DataGrid only updates the ArrayCollectio...

Flex custom sorting capabilities with server side support

The sorting capabilities that are available in Flex assume that you have access to all the data, but I'm using a paginated datagrid (with custom code), the datagrid is binded to an ArrayCollection instance, on the next page call I change the data of the dataprovider and everything works ok, but for sorting I need to override the click or...

Using one data source for multiple datagrids in Flex3

Hi there! I want to use one data source (e.g. an Array) for multiple Datagrids that have different filterFunctions attached and show different columns. First, I thought I use a very straight forward apporach: create the Array create an ArrayCollection for every DataGrid and set the "source" property to the Array create the DataGrids an...

Flex - Typed ArrayCollection as Horizontallist's dataprovider

Hi community! I have an ArrayCollection of objects. I'm passing this array to a horizontallist as a dataprovider and I'm using a custom itemRenderer. When executing the application, the horizontallist is displaying [object CustomClass][object CustomClass][object CustomClass][object CustomClass] I've tried casting each object in t...

External data in TileList Flex

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 and looking for some advice. Here's what I've got private function loadData():void{ var stmt:SQLStatement = new SQLStatement(); stmt.sqlConnection = sqlCon...

flex arraycollection - can i specify the size for an arraycollection?

Context: I use an ArrayCollection object as follows: 1) Number of elements is fixed. 2) Elements are inserted at a given position, based on some order. Question: Can I set the max size of the ArrayCollection? Will fixing the size improve the performance, as elements keep getting inserted into this collection? -Thank You ...

Doubt in action script for Flex: getting unique elements from an ArrayCollection

Hi, I have an ArrayCollection as mentioned below. private var initDG:ArrayCollection = new ArrayCollection([ {fact: "Order #2314", appName: "AA"}, {fact: "Order #2315", appName: "BB"} {fact: "Order #2316", appName: "BB"} ... {fact: "Order #2320", app...

Flex ArrayCollection bubble item up or down by one position

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? ...

XML to ArrayCollections

How do I insert XML data into an ArrayCollection in AS3? ...

Converting a string into ArrayCollection (C#, see string below)

how to get from such string ' name1{value1,value2};name2{value3}; ... nameN{value12, valueN} ' Array or arrays in such form: Array = {string, int};{string, int};{string, int}; like this: { { name1 ; value1} { name1 ; value2} { name2 ; value3} ... { nameN ; valueN} } in C# (.net)? ...

How to use ArrayList to store some data using ICollection

I want to store few strings into an array using ArrayList. How can I store all the strings at once without using Add function every time. Is it somewhat related to interface ICollection in anyway. Can I use ICollection to store my array. If yes How. ArrayList _1019=new ArrayList("TEN","ELEVEN","TWELVE","THIRTEEN","FOURTEEN","FIFTEEN"...

ArrayCollection error in Flex does not accept single XML nodes - alternatives?

hello, i get this error when i retrieve an XML that only has 1 node (no repeating nodes) and i try to store in an ArrayCollection. -When I have MORE than 1 "name" nodes...i do NOT get an error. TypeError: Error #1034: Type Coercion failed: cannot convert "XXXXXX" to mx.collections.ArrayCollection. this error occurs as the line of code...

How Do I Add Value To All Previous Values In Array

Lets say I have the following array: my_array = [1, 5, 8, 11, -6] I need to iterate over this array and add the values prior to the current value together. An example will probably be easier to understand. I need to return an array that should look something like this: final_array = [1, 6, 14, 25, 19] I have tried doing something ...

Two Objects created with the same Address in Flex

Hi, I have an issue in flex which is causing a bit of a headache! I am adding objects to an ArrayCollection but in doing so, another ArrayCollection is also picking up these changes even though there is no binding occurring. I can see from the debug that the two ACs have the same address but for the life of me can't figure out why. ...