simplejs is a nice example of how to add an ‘external object’ to js but it only deals with basic atom types. is it possible to have an attr which is a JSObject of some other type – a closure for instance? maybe using an attr of _jit_sym_pointer or _jit_sym_object? would a setter function for this attr get an atom with a void pointer which could be cast to a JSObject in the JSAPI? Could try this out myself but just wanted to know if this was even possible.
One thing that is not clear to me from the simplejs example – that object works by registering an A_GIMMEBACK method which gets passed a t_atom array for arguments and return value(s). The example you have here is what I was hoping was possible from my experience using JSAPI, but I don’t see how it is supported in the public SDK. How does one add a method with this signature to the t_class?