On 5月15日, 下午11时43分, Henrik Lindqvist <[email protected]>
wrote:
> I'll assume you'll call a callback function with the argv "array":
>
> Handle<Value> argv[] = {
>   Null(),
>   Undefined()
>
> };
>
> callback->Call(args.This(), 2, argv);
>
> On 15 Maj, 12:56, kuno <[email protected]> wrote:
>
>
>
>
>
>
>
> > On 5月12日, 上午9时42分, Henrik Lindqvist <[email protected]>
> > wrote:
>
> > > That should work.
>
> > > On 11 Maj, 06:09, kuno <[email protected]> wrote:
>
> > > > Hi all:
> > > >   this is my first post here, :)
> > > >   I am developing a c++ addon for nodejs (you guys knew nodejs,
> > > > right?). And I have a question, Is that possible to pass an Error
> > > > object as a parameter to
> > > > a callback funcion? for example
>
> > > > <======================================================
>
> > > > Local<Value> argv[2];
> > > > argv[0] = Exception::Error(String::New("Error message"));
> > > > argv[1] = String::New("Other parameter"));
>
> > > > callback->Call(Context::GetCurrent()->Global(), 2, argv);
>
> > > > =======================================================>
>
> > > > Is upon code valid within v8, if not, how can I do?
>
> > > > Thanks
>
> > > > --kuno
>
> > This seems works, thanks.
> > But how to asign Null() or Undefined() value to this array, e.g
> > <=========================================================
>
> > argv[0] = Null();
> > argv[1] = Undefined();
>
> > =========================================================>
>
> > off course, this will cause error during compilation.
> > Is there any way to do so?

thanks, it works!

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

Reply via email to