Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Simulating a Menu Bar with Pop-Up Menus Message-ID: <32966@ucbvax.BERKELEY.EDU> Date: 3 Dec 89 04:43:22 GMT References: <9095@hoptoad.uucp> <1989Nov28.053644.28100@agate.berkeley.edu> <2880@murtoa.cs.mu.oz.au> <32943@ucbvax.BERKELEY.EDU> <2884@murtoa.cs.mu.oz.au> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 36 In article <2884@murtoa.cs.mu.oz.au> rob@murtoa.UUCP (Robert Wallen) writes: _>>I just checked THINK C V.4 for this. It crashed with a bus error. _>>It is undoubtedly a bug in Apple's code. _>Yeh? Why? I mean sure the standard MDEF doesnt work quite the way I want it _>to but I have never had it crash with bus errors or address errors... _>Id blame Symantec before Apple on this one. I owe Apple an apology. I just double checked using a pop-up menu tester program I wrote. Apple's MDEF doesn't crash on its own, this is a bug in THINK C Version 4. _>My biggest object to writing my own MDEF (which is basically a copy of MDEF-0) _>is that I cant track Apples changes to the system. I dont have a color Mac _>(just an SE/30 :-) and so its 'real hard' to make sure that my custom MDEF, _>CDEF, etc handle all the appropriate 'mctb' thingies. I would prefer to be _>able to call the 'standard' code because I know (hope) that Apple will keep it _>up to date for me. Apple's source code for the current MDEF 0 is available on some for-pay services such as MacNet. You can call the standard code, just call it like you would any code handle: mdef0 = GetResource('MDEF', 0); HLock(mdef0); CallPascal(mesg, men, mRect, where, which, *mdef0); HUnlock(mdef0); The standard warnings about tail patches apply here, and you can't just jump to it, since you need to unlock it after, but I think the risk is acceptable, since the menu manager has to be able to call user-written MDEFs, so it unreasonable to expect MDEF0 to patch bugs in the system. > The mac is a detour in the inevitable march of mediocre computers. > drs@bnlux0.bnl.gov (David R. Stampf) --- David Phillip Oster -master of the ad hoc odd hack. Arpa: oster@dewey.soe.berkeley.edu Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu