Is there any way to get an object by it’s UID so that the following code would work?
When the function finishes, the value of property “xxx” should be “string two” not “string one”.
// Test class
public function test():void {
this.xxx = "string one";
foo.bar(this.xxx);
trace(this.xxx); // Prints: string two
}
// Foo class
public function bar(value:*):void {
// ... What would I have to do here to get the property, not its value?
value = "string two";
}
What about using the Box brackets? I know this is not the OO way of doing the thing but Action script supports it and it looks like a good alternative here.
This should do the trick. But You need to make sure whichever code calls “bar” method passes a valid object which has “xxx” property defined as this code is not type safe any more.