我有一個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