Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Append menu is slow. Keywords: AppendMenu menu slow efficiency Message-ID: <7253@hoptoad.uucp> Date: 11 May 89 21:10:41 GMT References: <89May9.171757edt.11077@ephemeral.ai.toronto.edu> <554@biar.UUCP> <89May10.154646edt.10758@ephemeral.ai.toronto.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 21 I agree with Robert Woodhead that you should not put that many items in a menu. Take a look at someone with tons of fonts using an application with a Font menu sometime; it's horrible. However, if you *do* want to do this, Larry Rosenstein's suggestion should work, replacing the defproc temporarily with one that ignores the calculate call. However, that requires modifying an internal Menu manager data structure directly, and so it might break in the future (as Keith Rollins pointed out in another connection). I would suggest that you use your own MDEF resource, which is set up *not* to draw the contents of the menu item. Instead, make all the menu items null or a blank space. Inserting them should be easy. Keep the actual menu text in an external array or linked list and use that in your drawing and calculating routines. Turn off calculation during your AppendMenu sequences. This gives you speed, and does not require dealing with internal data structures. However, I will leave the issue of communicating between the MDEF and the application as an (easy) exercise for the reader. -- Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim "This signature is not to be quoted." -- Erland Sommarskog