Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!nsc!voder!apple!nerm From: nerm@Apple.COM (Dean Yu) Newsgroups: comp.sys.mac.programmer Subject: Re: Sys7.0 aliases and MPW Keywords: System 7.0, MPW aliases Message-ID: <50968@apple.Apple.COM> Date: 29 Mar 91 21:46:52 GMT References: <1991Mar29.010609.6355@lynx.CS.ORST.EDU> <50943@apple.Apple.COM> <1991Mar29.144130.25920@ux1.cso.uiuc.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 31 In article <1991Mar29.144130.25920@ux1.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes: >In article <50943@apple.Apple.COM> I wrote: >> The current version of MPW doesn't know about aliases, so you can't do what >>you want to do easily... > >I guess this is old news, but you mean that system 7 aliases require >cooperation from my application? In a sense. If the user double clicks an alias to a document in the Finder, the Finder will resolve the alias before passing the Open to the application. Standard File also automatically resolves aliases for you. (Which is kind of a pain when you're trying to open the actual alias file in ResEdit, but that's another story...) Basically, if you get files by going through an interface that we provide, like Standard File or the Finder, then you don't have to change a thing. When you make direct calls to the file system, that's when you have to do the extra work of checking to see if the file you're writing to is the real file or an alias, and if it's an alias, call _ResolveAlias. (Say someone made an alias to your preferences file, and moved that somewhere else. If you don't check to see if it's an alias, you'll wind up writing into the alias file, and not into the real preferences file.) > >Surrealism is alive and well, and living in the Macintosh filesystem... Breeding like rabbits is probably more apt... -- Dean Yu Blue Meanie, Negative Ethnic Role Model, etc. Apple Computer, Inc. My opinions and so on and so forth...