Path: utzoo!attcan!uunet!shelby!agate!garnet.berkeley.edu!deadman From: deadman@garnet.berkeley.edu (Ben Haller) Newsgroups: comp.sys.mac.programmer Subject: Re: DA's, just say no! Message-ID: <1991Mar2.215442.18842@agate.berkeley.edu> Date: 2 Mar 91 21:54:42 GMT References: <12182@pt.cs.cmu.edu> Sender: usenet@agate.berkeley.edu (USENET Administrator) Organization: Stick Software Lines: 37 In article <12182@pt.cs.cmu.edu> hairston@henry.ECE.CMU.EDU (David Hairston) writes: > I've got this simple app that only makes sense when run under > MultiFinder (i.e. it displays some info but otherwise does > nothing useful). Since it assumes MultiFinder, I've decided > not to add support for DA's within my application (after all, > there's DA Handler). This only means that if you install a > DA in my app then I won't open it but I will still otherwise > open DA's into DA Handler. To accomplish this goal I thought > I'd simply set the current resource file to the system file > and then AddResMenu(AppleMenuHandle, 'DRVR') and then switch > the current resource file back to my application when creating > my application menus. Is this approach "star-crossed" for > any reason (i.e. too simplistic)? Well, I have no idea if this is System 7.0 compatible and such, but I object to it for a much simpler reason: under System 6.0.x, a user may open a DA in the same layer as an app by holding down option and selecting the DA's name. If you don't support DAs in your app, it will behave strangely, and possibly crash, when someone does this. This is unacceptable. And yes, there are reasons why people would do this - I have reasons to do it all the time. I probably option-open more often than not. Why do you not want to support DAs? Just laziness? Also remember that MultiFinder uses a lot of strange tricks to do things, any many of those tricks depend on the apple menu of an application working in a predictable way. MultiFinder fakes apple menu selections to force clipboard conversion, and I think other stuff too. Finally, I fail to see why you want to take your app out of the resource path before calling AddResMenu *anyway*. I thought that DAs inside an apps resource file would be opened in their own layer just like DAs in the System file. Is this not true - are they opened in the same layer as the app? BTW, hi, Dave. -Ben Haller (deadman@garnet.berkeley.edu)