Hi

I'm using EMSCRIPTEN_BINDINGS to bind a C++ class. Im my JavaScript code 
all works well and I can do new Module.MyClass()

What I would like to do is initialise the class in my C++ code, pass the 
pointer to JavaScript and then call methods on that instance.

I have a hacky version working like this:

jsTest: function(self) {

        var instance = new Module.Assets();
        instance.$$.ptr = self;
        instance.loadingDone();
    }

This will call loadingDone on my instance created in my C++ code with the 
instance pointer passed to the JavaScript function as self

Does anyone know how I can do this properly?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to