Ejemplo n.º 1
0
/* ECMAScript constructor */
Handle<Value> ScrollView::New(const Arguments& args)
{
    HandleScope scope;

    if (!args.IsConstructCall()) {
        return ThrowException(Exception::TypeError(
                                  String::New("Use the new operator to create instances of this object."))
                             );
    }

    // Creates a new instance object of this type and wraps it.
    ScrollView* obj = new ScrollView();
    obj->Wrap(args.This());

    return scope.Close(args.This());
}