[haXe] Reflect.callMethod()

Franco Ponticelli franco.ponticelli at gmail.com
Sun Apr 9 00:59:14 CEST 2006


Just to practice with haXe I'm doing some tests and I need some
clarifications about Reflect.callMethod().
The parameters are: the object on which I want to execute a method, the
method name as a string and the optional arguments ... right?
Now, in the function code I see:

func.apply(o,args)

for both flash and js.

Althought this seems not to be a problem in AS2, in JS it not makes much
sense to me. "func" should be a function reference for this code to work,
instead is an instance of String.

I've altered the code this way:

o[func].apply(o, args)

... I don't know if that should have other implications ...

Bye,
Franco.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20060408/0973743f/attachment.htm


More information about the Haxe mailing list