v8::Value has a method IsArray() but doesn't appear to have a
corresponding ToArray() method. I've tried to cast directly to a
Local<Array> but haven't had any luck.

  static Handle<Value>
  MyFunc (const Arguments& args)
  {
    HandleScope scope;

    if (args.Length() == 0 || !args[0]->IsArray()) {
      return ThrowException(String::New("Argument must be an array"));
    }

    Local<Array> input = args[0].ToArray(); // what is the correct
code here?
 }


Couldn't infer how to do this from the documentation.

Cheers,
Xavier

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

Reply via email to