package yanggang.tstAS3.tstRefChain{
public class RefChain{
public static function main():void{
var model:Object = { someObject:{ name:"someObject"}};
var vo:Object = model.someObject;
vo = { name:"someNewObject" };
trace( model.someObject.name );
}
}
}
Guess what???
It prints someObject!!
Anything wrong Kevin plz??
--- In [email protected], Kevin <[EMAIL PROTECTED]> wrote:
>
> This may be a simple question, but it's stumping me.
>
> I have a component that contains a property (type object) that holds
> a reference to an VO on my model.
>
> How to I "unlink" that reference?
>
> For example, when I set the property:
>
> var vo : Object = model.someObject;
>
> I then do something like this:
>
> vo = someNewObject;
>
> This happens....
> model.someObject get's set to someNewObject...
>
> This is not what I want. Therefore, I assume I have to "unlink" the
> reference of vo to model.someObject, before I give it another
> reference. How do I do that?
>
> Thanks, Kevin
>