Hello Nicolas,
NC> If I remember correctly, Neko linker does not fill the exports table, so
NC> you cannot get functions from a linked module.
NC> If instead you directly load "tools/WebServer.n" then it will lazily
NC> load all its dependencies and you might be able to get some methods from it.
NC> Also, you can use neko.vm.Loader.local() to get current Loader from haXe.
Thanks for the help, it now works a little better. The code now is:
var server = neko.vm.Loader.local().loadModule("webserver");
var init = server.getExports().get("init");
trace(init);
Reflect.callMethod(server, init, []);
however, my console then says smth like
Server.hx:5: #function:1
Called from <null> line 2
Called from Server.hx line 6
Called from Reflect.hx line 126
Uncaught exception - Invalid call
so it gives me a function successfully, but when trying to call one,
it throws "invalid call". Any further pointers?
--
Best regards,
Michael mailto:[EMAIL PROTECTED]
--
Neko : One VM to run them all
(http://nekovm.org)