Why don't you use VOs?
El 15/05/2009, a las 14:42, Bob in SC <email@example.com> escribió:
working on my first project and hit another snag.
I have a datagrid control. Here's what works and what doesn't
- if i have a "normal" array of objects (serverLA) which is used
when i create the ArrayCollection (serverAC) -- i.e.
serverLA = someobject1;
serverLA = someobject2;
serverLA = someobject3;
everything seems to work fine.
However, if my array is an associative array where i'm using a
string as the key, it doesn't
serverLA["string1"] = someobject1;
serverLA["string2"] = someobject2;
serverLA["string3"] = someobject3;
I don't get any error but nothing appears in the datagrid and when i
look at the ArrayCollection object in the debugger...the array
elemenets are only under source...none are directly under the
can i use associative arrays for this?
OK...well, what's a VO.
Also, does this mean that it's true that one cannot use an associative array in a data grid control?
I have Never tried using what you want to. A value object is a design
pattern (class) that is normally used to transfer data between
software apps, and represent data.
Did you trace the array collection?
There are no built-in collections for iterating through an associative array. If you build one that implements IList then you can use that as the dataProvider for DataGrid. The key will be defining the order of iteration. It must be stable regardless of direction.
Flex SDK Developer
Adobe Systems Inc.