开发者

yui3 widget error "this.constructor.NAME is undefined"

I am creating a yui3 widget and I keep getting this error: this.constructor.NAME is undefined.

I am defining a name in my widget:

YUI().add('pagina开发者_JS百科tor', function(Y) {

    function Paginate(config) {
        Paginate.superclass.constructor.apply(this, arguments);
    }

    Paginate.NAME = "paginate";
    ...

So, I am not sure what's going on.

Edit: I also wanted to add that I have just tried to add the default widget skeleton from here and I am still getting the same error.


I thought I would answer this myself in case anyone else comes across this problem. I forgot the new keyword when creating my widget.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜