Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!apple!sticks!dwb From: dwb@sticks.apple.com (David W. Berry) Newsgroups: comp.sys.mac.programmer Subject: Re: Hierarchical menu question Message-ID: <1579@internal.Apple.COM> Date: 28 Apr 89 17:40:03 GMT References: Sender: usenet@Apple.COM Distribution: na Organization: Apple Computer Lines: 44 In article des@orenda.amara.uucp (Dave Steinhoff) writes: > >I am currently developing an application that requires a large number >of menus. The hierarchical menu mechanism is ideal to help me shrink >the number of distinct menus I need by having many 'paths' through >the menus end up at the same final menu (a DAG). However, I also need >to know what the intermediate selections were along the way in order >to distinguish special cases. So, for example: > > menu 101 menu 102 menu 103 > +---------+ +---------+ +---------+ > | a |----- | e | | h | > | b | \----->| f |----------->| i | > | c | | g | +---------+ > | d | +---------+ > +---------+ Gaackkk..... To quote some immortal who may claim the quote if he so desires: "Hierarchical menus are a bad dream. If you ignore them they'll go away." Hierarchical menus do have some uses. Unfortunately they tend to get over used. For a prime example see WingZ. Although I am in general very pleased with WingZ, I am incredibly annoyed that almost everything I want to do has to be done via a hierarchical menu choice. > >...returns from MenuSelect a longword result of integer pairs 103/2. >I would also like to capture the pairs 101/1, 102/2. Does anyone >know if the standard menu defproc can be twiddled to give me this >information? MenuSelect will return 0 if 101/1 or 102/2 is selected. After that you can call pascal long MenuChoice(void) to determine which disabled item was selected. For you assembly hackers you can look at MenuDisable (0xb54) to get the same information. MenuDisable is stuffed by the standard def proc, so if a custom menu proc is being used it may contain garbage. Opinions: MINE, ALL MINE! (greedy evil chuckle) David W. Berry (A/UX Toolbox Engineer) dwb@apple.com 973-5168@408.MaBell AppleLink: berry1