stopListening到Mojo.Event
|
我在webOS应用程序中有几个事件侦听器,每个侦听器都是这样设置的:
this.controller.listen(
\'aWidget\',
Mojo.Event.widgetEvent,
this.respondToWidgetEvent.bindAsEventListener(this)
);
为了停止监听,我编写了如下代码:
this.controller.stopListening(
\'aWidget\',
Mojo.Event.widgetEvent,
this.respondToWidgetEvent.bindAsEventListener(this)
);
但是,我现在意识到我的听众可能不会停止。当我在函数上调用bindAsEventListener
时,是否每次都返回相同的对象?如果不是,ѭ3does是否确保仍然删除适当的侦听器?
没有找到相关结果
已邀请:
1 个回复
雄鞋谋塘