ADC Home > Reference Library > Technical Q&As > Apple Applications > Sherlock >
|
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] |
|