Getting textual input from a menubar app? Cocoa
So I created a menubar app (agent application) and I need to find some way to get textual input via the menubar icon. I heard that making a popup modal with a textfield is frowned upon, and putting a 开发者_如何学编程text field in an NSMenuItem
is bad for functionality. It doesn't even work, when I try.
You could use the new NSPopOver
API in Lion. It will create a non-modal window anchored to a particular location, which seems to be exactly what you're looking for.
精彩评论