On Mon, Jun 7, 2010 at 4:45 PM, Martin Cohen <martin.bala...@gmail.com>wrote:
> m_instances.insert( std::make_pair( object, js_object ) );If you want to skip a lot of trial and error, and jump right into your
> // Set the internal field value to the C++ object
> js_object->SetInternalField( 0, v8::External::New( object ) );
> return js_object;
> However a returned object has no class name set, so the "instanceof"
> operator does not work. From what I've learned, the "instanceof"
> operator works using the object.prototype.constructor property, though
> I'm not sure how to correctly set it up in this wrap function.
coding, i strongly recommend using one of the several 3rd-party libs which
take care of those bits for you.
A partial list (the ones i know about):
Slapping a single class binding together isn't too much work (once you've
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.