I haven't really looking into how it's doing it, but some components like the datagrid do this. Pass in the ref to the object and the name of the property as a separate property.
--- In flexcoders@yahoogroups.com, Kevin <[EMAIL PROTECTED]> wrote: > > I think I need to be a little clearer about what I need. > > let's say i have an instance of an object property somewhere: > > model.someObject.currentObject.name > > I want to pass that reference location (not the value) through a > component like this: > > source="model.someObject.currentObject.name" > > so that inside the component I can update the object using the > reference: > > (this is what I don't know how to do) > parent[source] = someValue; > > If I use the curly braces it just binds the object value (not a > location reference) to the property source. It seems the <mx:Binding > > tag is doing a similar thing, but unfortunately it's one of those > classes that I can't look inside to see how they do it! > > Does this make more sense about what I am trying to do? > > Thanks, Kevin > > > > > > On Mar 12, 2007, at 11:42 PM, Gordon Smith wrote: > > > > > I suspect you meant to say that trace(source) is tracing out the > > string "model.someObject.currentObject". > > > > I think you want > > > > <comp:SomeCustomComponent > > source="{model.someObject.currentObject}"/> > > > > - Gordon > > > > From: flexcoders@yahoogroups.com > > [mailto:[EMAIL PROTECTED] On Behalf Of Kevin > > Sent: Monday, March 12, 2007 8:22 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Passing an object reference as a property > > > > I would like to pass an object path through a property of another > > class, but can't figure out how to do it. > > > > model.someObject.currentObject (the ML variable) > > > > <comp: SomeCustomComponent source="model.someObject.currentObject" /> > > > > class SomeCustomComponent{ > > > > public var source:Object; > > > > function test(){ > > > > trace(model.someObject.currentObjec); > > > > } > > > > } > > > > This outputs the string "model.someObject.currentObject" rather than > > the variable value at - model.someObject.currentObject > > > > thanks for the insight. > > > > - kevin > > > > > > > > >