The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: Stephan Beal <sgb...@googlemail.com>
Date: Mon, 7 Jun 2010 22:08:30 +0200
Local: Mon, Jun 7 2010 4:08 pm
Subject: Re: [v8-users] Wrapped C++ objects so instanceof operator works
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): http://code.google.com/p/v8-juice (that one's mine! :) 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.
| ||||||||||||||