开发者

Getting textual input from a menubar app? Cocoa

开发者 https://www.devze.com 2023-03-31 23:00 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消