jpd00964@uxa.cso.uiuc.edu (08/04/89)
Is there any easy way to get the id of a submenu without an outlet? I know how to get the id of the main menu, but how do I go through its submenus? Michael Rutman Softmed
jasmerb@mist.CS.ORST.EDU (Bryce Jasmer) (08/05/89)
In article <246300028@uxa.cso.uiuc.edu> jpd00964@uxa.cso.uiuc.edu writes: > >Is there any easy way to get the id of a submenu without an outlet? > >I know how to get the id of the main menu, but how do I go through its >submenus? I haven't tried this but it looks pretty easy to do. Get the id of the main menu (theMenu = [NXApp mainMenu];) which is a matrix of menuCells, cycle through each cell and check if it is a submenu. (someBOOL = [theMenuCell hasSubmenu];) I hope this helps somewhat. ----------------------------------------------------------------------------- |"The problem that I find most distressing is that Bryce Jasmer | people tend to make sweeping generalizations. We jasmerb@hobbes.cs.orst.edu | all are guilty of this." -----------------------------------------------------------------------------
ali@polya.Stanford.EDU (Ali T. Ozer) (08/05/89)
In article <11968@orstcs.CS.ORST.EDU> Bryce Jasmer writes: >>Is there any easy way to get the id of a submenu without an outlet? >I haven't tried this but it looks pretty easy to do. Get the id of the >main menu (theMenu = [NXApp mainMenu];) which is a matrix of menuCells, >cycle through each cell and check if it is a submenu. >(someBOOL = [theMenuCell hasSubmenu];) And the id of the submenu is available as the target of that cell; so [theMenuCell target] should give you the submenu. Ali Ozer, NeXT Developer Support aozer@NeXT.com