Cocoa: Auto close a status menu
I hava a status menu on the status bar, and I have some tasks running behind the scene. When one of task is done, assume at the time the menu is being showed (dropped down), I want to make the menu to be not in drop down mode (pretend doing a left click 开发者_如何学Pythonon the mouse on the menu icon) automatically. Is there a way to do that?
It's there, but the name is a little bit counterintuitive: You want NSMenu's cancelTracking
.
精彩评论