Ah ha! That explains why, after modifying the columns array, we have to re-assign our modified array back to the columns property. One more question answered without me having to do any work! Thanks.
Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Saturday, October 20, 2007 2:43 AM To: [email protected] Subject: RE: [flexcomponents] DataGrid column access Yeah, you're making a copy every time. Shouldn't be a major performance hit as it doesn't clone the column objects, it just makes a new array of references to them. If you have to get at them often, you might want to keep a reference to the set you passed in, or cache the set from the DG unless you think it is going to change often. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of reflexactions Sent: Friday, October 19, 2007 11:10 PM To: [email protected] Subject: [flexcomponents] DataGrid column access I am working on a DataGrid subcomponent and have been accessing the columns array frequently, thinking nothing of it I just do something like: ... columns[i] ... but then I saw that the columns getter function does a _columns.slice (0). Is the compiler smart enough to figure out i dont really want to clone the columns array every time I access it or am I really forcing it to copy the array? tks
