If you call o.foo(bar) and o.foo is an
> property handler returning a v8::Function, then that function should
> be called with Arguments of length 1.
Thank you.
Really, it works when I delete one string,
Handle<Value> foo(const Arguments& args)
{
int argc = args.Length();
return Undefined();
}
Handle<v8::Value> Getter( Local<v8::String> property, const
AccessorInfo& info )
{
HandleScope handle_scope;
if (property->Equals(v8::String::New("foo")))
{
Handle<FunctionTemplate> templ = FunctionTemplate::New(foo);
Handle<Function> func = templ->GetFunction();
Local<Object> obj = func->NewInstance();//delete this string
return handle_scope.Close(obj);
}
return Undefined();
}
The error was in creating instance of the function.
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users