I\'m writing some Actionscript3 code that attempts to apply a method to an object that is determined at runtime. The AS3 documentation for Function.apply and Function.call b
Have you tried actually using the this reference explicitly, i.e.:
internal class MyObj
{
private var _name:String;
public function MyObj(name:String)
{
_name = name;
}
public function sayName():void
{
trace(this._name);
}
}
It might just be that when the this keyword is omitted, the original instance is used to look up the field/variable, whereas what thisArg really does is to re-bind the this keyword. If that's the case it's arcane at best, but it might be worth a try.