On Thu, Dec 23, 2010 at 12:37 PM, Stephan Beal <[email protected]>wrote:

> On Thu, Dec 23, 2010 at 3:08 PM, Vyacheslav Egorov 
> <[email protected]>wrote:
>
>> You are setting internal field count for instances created by the function
>> not for the function itself.
>>
>> There is currently no method in the API to set internal field count for
>> the function itself.
>>
>
> @Allan: i believe what this means, in concrete terms, for you is that you
> should call SetInternalField() on the objects returned by 
> method_ctor->NewInstance().
> Those will have, in your case, 2 empty slots which you can populate.
>
Calling NewInstance I'm calling the function, right? But I can't call it
because I don't have the arguments. The user will provide them.

Let me explain the big picture.

What I'm trying is to implement an object like ActiveXObject (but tailored
to my application), which I call V8COMCreate.

So the user will:
comobj = new V8COMCreate('somerandom.progid');
comobj.someRandomMethod(some, args);
comobj.someRandomMethod2(otherargs);

The snippet I provided is the one for the interceptor of comobj which
handles for example the get of obj.someRandomMethod.

I'm trying to pass some data (related to 'somerandom.progid') to the
dynamic-created someRandomMethod, so it knows from which COM Server to
invoke the method.

There is a better way to create dynamic methods?

Thanks,
-- 
Allan Douglas R. de Oliveira

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to