[flexcoders] Can I use a variable to refer to an object's property name?

2007-05-31 Thread Peter Demling
(This is a fundamental question, and it' challenging to find a clear way to ask it): Let's say I have an ArrayCollection data source with 50 fields (which I do), and my user selects the name of one of these fields (let's say PRODUCT) with myComboBox, so that it's now in

Re: [flexcoders] Can I use a variable to refer to an object's property name?

2007-05-31 Thread Ed Smith
? Can I can instead do something like item.[myComboBox.selectedItem.data]? Do you know what I mean? Actually, I think item[myComboBox.selectedItem.data] should actually work just fine, Ed Peter Demling wrote: (This is a fundamental question, and it' challenging to find a clear way to

RE: [flexcoders] Can I use a variable to refer to an object's property name?

2007-05-31 Thread Tracy Spratt
Yes, just leave off the . After item. This bracket notation technique will work to return a reference to any object within another, including this. It works on both sides of an assignment, assuming the object is dynamic. Tracy From:

Re: [flexcoders] Can I use a variable to refer to an object's property name?

2007-05-31 Thread Paul deCoursey
Peter Demling wrote: (This is a fundamental question, and it' challenging to find a clear way to ask it): Let's say I have an ArrayCollection data source with 50 fields (which I do), and my user selects the name of one of these fields (let's say PRODUCT) with myComboBox, so that it's now in