I have a class defined like thi开发者_开发知识库s (scheme) :
myClass = BaseClass.extend({
method1 : function(){ ...},
method2 : function(){ ...}
});
How can I call method2 from method1? something like:
myClass = BaseClass.extend({
method1 : function(){ method2(); },
method2 : function(){ ...}
});
you need scope:
this.method2();
精彩评论