tags:

views:

22

answers:

1

I'm pretty sure i've seen this somewhere (not counting the help menu), and I feel like you could just drag one in under ib in leopard. Not that it matters, but it will either go into a dock menu or a service. Thanks

+2  A: 

Try setting an NSTextField as the view of an NSMenuItem.

You can do this in IB by dragging the text field into the nib as a top-level object and setting the menu item's view outlet to point to the field.

Tricky thing you may need to solve in your app: In the IB simulator, at least, pressing return/enter did not dismiss the menu.

Peter Hosey
This seems to work for the menu bar, however I am trying to get it to be in the dock menu, and it doesn't seem to be working. However I think this is the way one is supposed to do this, and thats why I'm marking this as the right answer.
Jared P
Yeah, Dock menus are technically running in the Dock's process, so I'm not surprised that you can't put custom views into their menu items. I'd guess that the implementation behind the scenes is something like generating a plist of menu item IDs and titles and sending that to the Dock through some form of IPC.
Peter Hosey