ADC Home > Reference Library > Technical Q&As > Apple Applications > Sherlock >

Adding menu separator items to controls in a Sherlock channel


Q: How do I add a menu separator item to an NSPopUpButton control in my Sherlock Channel?

A: When you initialize NSPopUpButton controls in a Sherlock channel, you use the items property of the control to specify the menu items of the control. The items property of the button can contain either an array of strings or an array of dictionaries. If you want to create the menu using an array of strings, use the string "SherlockMenuItemSeparator" to create a separator.

If you want to create the menu using an array of dictionaries, create a new dictionary for the separator. Put a "title" key in the dictionary with the value "SherlockMenuItemSeparator". You do not need to put the "representedObject" key in the dictionary.


[Jan 21 2003]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.