[comp.sys.next] Adding submenu items

zazula@neutron.physics.arizona.edu (Ralph E. Zazula) (05/30/91)

I'm trying to add a number of submenu items to an existing menu.
I used IB to add a "Submenu" menuCell to the applications main menu.
I deleted the one submenu "item" so that there are no items in the
submenu at launch.  I created the outlet partMenuCell and connnected it
to the submenu button (named "Parts").  Here is the snippet of code
I am trying to use to add sub-items to Parts:

	[[[partMenuCell target]	    // this returns the id of the sub menu
		addItem:"this part"
		action:@selector(orderFront:)
		keyEquivalent:'\0']		// this should make the item
		setTarget:[partWindowList objectAt:i]];  


partWindowList is a list of Window objects and i is a loop variable.
The program dosen't crash when I run it but the items "this part" never
show up in the "Parts" submenu.  Any ideas?

Thanks,
Ralph

--

   |----------------------------------------------------------------------|
   | Ralph Zazula                               "Computer Addict!"        |
   | University of Arizona                 ---  Department of Physics     |