Opened 14 years ago

Closed 14 years ago

#4357 closed defect (invalid)

dojo.declare: ii.apply is not a function

Reported by: guest Owned by: anonymous
Priority: high Milestone:
Component: Core Version: 0.9
Keywords: dojo.declare Cc:
Blocked By: Blocking:


The Dojo Book 0.9 gives this example for defining classes:

dojo.declare("", [, my.mixin], {

initializer: function() { /*, args*/); invoke some mixin constructor (note: my.mixin.prototype is ignored)


valueForPrototype: 3,

methodForPrototype: function() {



But it results in this message

DEPRECATED: dojo.declare: for class 'ht.classes.ClickAnalyser?' pass initializer function as 'constructor' property instead of as a separate argument. -- will be removed in version: 1.0

ii.apply is not a function [Break on this error] if(ii=c.prototype._constructor){ii.apply(this, args);}

The error message disapeared when I moved the code to the constructor property.

Maybe you should correct this example in the Dojo Book 0.9.

Change History (1)

comment:1 Changed 14 years ago by Adam Peller

Resolution: invalid
Status: newclosed

please file comments/errors directly in the book using the commenting mechanism. For starters, this would give us a better reference to where this occurs in the book, if it's still a problem. The example I see in the book properly uses constructor now.

Note: See TracTickets for help on using tickets.