Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!wuarchive!udel!rochester!pt.cs.cmu.edu!henry.ECE.CMU.EDU!hairston From: hairston@henry.ECE.CMU.EDU (David Hairston) Newsgroups: comp.sys.mac.programmer Subject: Re: DA's, just say no! Message-ID: <12191@pt.cs.cmu.edu> Date: 3 Mar 91 21:23:15 GMT References: <12182@pt.cs.cmu.edu> <1991Mar2.215442.18842@agate.berkeley.edu> Organization: Gaia II Lines: 58 [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)? [deadman@garnet.berkeley.edu (Ben Haller) writes:] [] 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. i should have mentioned that i did write a simple check for this and in this case i simply display an alert that says " does not support DA's in its own partition." [] Why do you not want to support DAs? Just laziness? well, i was trying to minimize useless functionality and i couldn't think of any good reasons why someone would want to open a DA in my itsy-bitsy 32k partition. supporting DA's is trivial but since I've got DA Handler I thought I'd figure out how to correctly not support DA's (in my partition), if this resulted in a size saving. from a user's perspective, why would it be _necessary_ to open a DA in my app since they can use DA Handler? [] 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? in my experience, DA's installed in an apps resource file are opened in the apps layer (can't vouch for system 7). thus i thought of the above trick to not see DA's inadvertently installed in my app. i know this is terribly unfriendly, but ... [] BTW, hi, Dave. ... ;) -dave- hairston@henry.ece.cmu.edu "It was a nightmare! It started with these giant red lips, floating around!"