Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!husc6!sunfs3!kent From: kent@sunfs3.camex.uucp (Kent Borg) Newsgroups: comp.sys.mac.programmer Subject: Re: System 7.0 & Aliases Message-ID: <488@sunfs3.camex.uucp> Date: 24 Aug 89 16:27:37 GMT References: <227700026@uxa.cso.uiuc.edu> <483@sunfs3.camex.uucp> <9173@thorin.cs.unc.edu> <13784@shamash.cdc.com> <490@sunfs3.camex.uucp> <30837@ucbvax.BERKELEY.EDU> Reply-To: kent@sunfs3.UUCP (Kent Borg) Organization: Camex, Inc., Boston, Mass USA Lines: 47 In article <30837@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes: >In article <490@sunfs3.camex.uucp> kent@sunfs3.UUCP (Kent Borg) writes: >>`Aliases', as they are calling them, are implemented as a >>little file which has the volume name and file id (itself a new 7.0 >>feature) of the actual file. > >Note, this means that your Save command had better write the data back >into the original file, and not into some newly created file that it will >rename if the write succeeds. (if it destroys the original in the course >of the save, it will disconect any aliases that file might have.) > >How many programs do a delete before the save? How many don't catch the >fact that delete uses the poor man's search path, so if you try to create >a document named "Finder" a side effect is to delete the Finder? > >Programmer beware! Programer take care! As I understand it, aliases are implemented as a charade put on by the standard file dialogs and the Finder. When user says "Open...", and in the open file dialog selects an alias file, then clicks "OK", the reply record will be filled in with the details of the *actual* file (mounting a needed AppleShare volume if needed), as if the user had actually gone and opened that file. The application never sees the alias file or its directory. The Finder will do about the same. If the user double clicks on an alias file, the Finder will find the real thing and pass info about it to the application. (I don't know about icons for aliases. I guess that they might be just like the icon of the actual file, but with some regular adornment like a gray drop shadow??) One problem I see with aliases will be for people who have hacked the standard file dialog. What if you want to access the file in a hook routine? Maybe you are displaying a thumbnail sketch of a large image and need to look at a low resolution version you left in a resource. What will you see at hook time? Will delete still use the Poor Man's Search Path? I don't know. I do know that Apple is working very hard to not break old programs. Kent Borg kent@lloyd.uucp or ...!husc6!lloyd!kent