The real issue here is that when using MXML you can only pass in values or bindings. You can't really pass in objects. And that's because MXML is declarative, i.e. it just "is" so to speak. Its value-oriented, and in ActionScript there is no "value" reference (a pointer or address) like there are in other languages.
Binding is the best you can do. As was suggested, you bind to an object then separately specify the property (or property chain, i.e. an array of strings) that you want to access. That requires that your object be bindable. Which makes sense, because when the MXML is instantiated (or rather, the classes it generates) there's no guarantee that your object is instantiated yet (hence, why binding is used). Troy. On 3/13/07, Paul J DeCoursey <[EMAIL PROTECTED]> wrote:
Those are valid use cases, and your suggestion isn't a bad one. (Note: the following is my mind wandering and isn't really related) I speculate that there is a better way. Within those use cases there are still some issues, what if the object in question is a member of a collection? I think what we need is XPath on the object model. I better stop thinking about this or I'll end up porting JXPath to AS3 and my clients will wonder why their projects aren't getting done. Ralf Bokelberg wrote: > > This is a different thing though. For example, what if the source > object doesn't exist at the time you are assigning the reference > because it is retrieved from the backend. What if your reference comes > from an external configuration file? I guess both methods have valid > uses. > > Cheers > Ralf. > > > >

