Tigretigre (talk | contribs) (New page: TA: I think the lines: InsertVariableCommand.prototype.Execute=function(){ } should actually be: InsertVariableCommand.Execute=function(){ } so as not to mix methods of creating a new ...) |
|||
Line 1: | Line 1: | ||
− | TA: | + | == Code error == |
− | I think the lines: | + | |
+ | TA: I think the lines: | ||
+ | |||
InsertVariableCommand.prototype.Execute=function(){ | InsertVariableCommand.prototype.Execute=function(){ | ||
} | } | ||
+ | |||
should actually be: | should actually be: | ||
+ | |||
InsertVariableCommand.Execute=function(){ | InsertVariableCommand.Execute=function(){ | ||
} | } | ||
− | so as not to mix methods of creating a new command. | + | |
+ | so as not to mix methods of creating a new command. Some places create prototypes and register an instance, but this example is acting on an actual function object and registering the command with that object. So the use of "prototype" here is inconsistent. | ||
+ | |||
+ | * Corrected, Thanks! |
Latest revision as of 15:30, 8 March 2008
Code error
TA: I think the lines:
InsertVariableCommand.prototype.Execute=function(){ }
should actually be:
InsertVariableCommand.Execute=function(){ }
so as not to mix methods of creating a new command. Some places create prototypes and register an instance, but this example is acting on an actual function object and registering the command with that object. So the use of "prototype" here is inconsistent.
- Corrected, Thanks!