$.Controller("Whiteboard", {}, {
init: function(){
var pen = new Pen();
},
sendRequest: function() {
// This function should listen draw/erasing events from Pen
}
});
$.Class("Pen",{},{
init: function() {
// Pen setup, click to draw etc..
}
});
像这样,我想要 Pen 的白板监听事件,我该怎么做?我需要控制器监听一个类。