我有一个NSMenu
,我想和项目更新通过pusherapp推到我的应用程序和使用libPusher client library好评。但事件似乎没有收到NSEventTrackingRunLoopMode
。libPusher +更新开放NSMenu
考虑下面的代码片段:
[channel bindToEventNamed:@"my_event" handleWithBlock:^(PTPusherEvent *event) {
NSLog(@"event received");
}];
,我等一推,发生在我维护菜单中打开,我希望立即对事件进行接收,但是当我关闭菜单我只能接受它。
我也试过将主队列传递给bindToEventNamed:handleWithBlock:queue:
(使用dispatch_get_main_queue();
),无济于事。
所以我在想我是否做错事或有错误的libPusher?
看一看,http://stackoverflow.com/questions/2808016/how-does-apple-update-the-airport-menu-while-it -is开 - 如何对变化nsmenu-W – adc 2012-08-07 15:27:22
是啊,这就是我说的正是由“事件似乎并没有在'NSEventTrackingRunLoopMode'要接收” ...... – 2012-08-07 16:11:16