Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!hsdndev!think.com!spool2.mu.edu!uunet!midway!news From: martin@cs.uchicago.edu Newsgroups: comp.sys.mac.programmer Subject: Re: Adding MENU generates "Unexpected error 69320382, [SORRY]" Message-ID: <1991Jan30.071816.23847@midway.uchicago.edu> Date: 30 Jan 91 07:18:16 GMT References: <1991Jan26.210319.3409@midway.uchicago.edu> <22935@well.sf.ca.us> Sender: news@midway.uchicago.edu (News Administrator) Reply-To: martin@cs.uchicago.edu Organization: University of Chicago Lines: 26 In-Reply-To: gurgle@well.sf.ca.us (Pete Gontier) I see I should have been more clear about my intentions. I want something that is like MacroMaker, in that its menu is added to *every* menubar. So my technique is to get the menu at INIT time and add it to the menubar via a patch applied before MultiFinder gets to the traps. In article <22935@well.sf.ca.us>, gurgle@well (Pete Gontier) writes: >Whoa there! You don't need to do an _InitGraf in a DA! And if you do find >a reason to do it, certainly don't do it relative to A5, because you're >likely to trash your host application's QuickDraw. If you really need to >do it (and you probably don't), make sure you have your own space for >QuickDraw globals and send THAT to _InitGraf. I thought an InitGraf might be necessary before InitFonts, since InitFonts seems necessary for the GetMenu I do at INIT time. But even so, I seem to get address errors in GetFontInfo depending on the phase of the moon...? >Now, about this DetachResource business: why? The Menu Manager is >perfectly happy with a resource handle. I've never bothered to detach a >menu resource, and although I can't think of anything specifically wrong >with it offhand, I think I would err on the conservative side. Because after the INIT is done, it will close its file and I believe the resource will go away unless it has been detached. Charles Martin // martin@cs.uchicago.edu