Closed jcmonnin closed 7 years ago
Hi!
Yes, the whole project documentation, and examples in particular, are quite incomplete. I will look through this and other examples, to check they work.
Thanks for fixing the examples in the documentation.
Thanks for the bug catching :-)
I think there are some other typos in the README.md:
// Memory for C++ class will remain when JavaScript object is deleted.
// v8pp::no_factory avoids creating any constructor for your C++ class from
// JavaScript, useful for classes you only wish to inject.
typedef v8pp::class_<my_class> my_class_wrapper(isolate);
v8::Handle<v8::Value> val = my_class_wrapper::reference_external(&my_class::instance());
// Assuming my_class::instance() returns reference to class
Should probably be something like:
// Memory for C++ class will remain when JavaScript object is deleted.
// Useful for classes you only wish to inject.
typedef v8pp::class_<my_class> my_class_wrapper(isolate);
v8::Handle<v8::Value> val = v8pp::class_<my_class>::reference_external(&my_class::instance());
// Assuming my_class::instance() returns reference to class
Yes, it should be, thanks!
The examples for user defined type do not work.
Problem is here:
v8::Value
has no methodLength()
(at least in recent v8 versions).Related to that there is also the separate pull request about typos.