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.
精彩评论