1
我在讨论如何访问我创建的小部件中的特定方法。来自德国Titanium中的示波器链
var foo = {
init : function() {
$.bar.addEventListener('click', this.handleClick);
},
handleClick : function(e) {
console.log(this); // TiUIButton { widgetId="Ti.UI.Button:0" ...
// I want to call baz() here....How to do that?
},
baz: function() {
}
};
foo.init()
问候,并感谢您的帮助,
--marc
只是做:'foo.baz();' –