Closed flexelektro closed 10 years ago
You are correct. Module.proto does what the example for extend suggests:
Module.proto({
"names" : ['claire', 'alice'],
"sayName" : function(i) {
console.log( "Hello " + this.names[i] + "!" );
}
});
If you wanted to extend only the single instance, you would use instance.extend()
Yes, you're right. Thanks for noticing. I fixed the example.
the first example at http://hay.github.io/stapes/#m-extend is:
apart from that there is missing a comma after the names value, this example cant run because you let call the instance the class method. Thats exactly what extend is not made for, isnt´t it ? Thats also the reason this example will not run.
I am so picky, because the documentation is the first thing you have a look at. I want use stapes for a quite large project, but if documentation lacks in these basics ...
best, felix