Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ukma!husc6!lloyd!kent From: kent@lloyd.camex.uucp (Kent Borg) Newsgroups: comp.sys.mac.programmer Subject: Re: Standard File Dialog Hacking Message-ID: <418@lloyd.camex.uucp> Date: 10 Jun 89 18:43:32 GMT References: <414@lloyd.camex.uucp> <4993@umd5.umd.edu> Reply-To: kent@lloyd.UUCP (Kent Borg) Organization: Camex, Inc., Boston, Mass USA Lines: 29 In article <4993@umd5.umd.edu> zben@umd5.umd.edu (Ben Cranston) writes: >In article <414@lloyd.camex.uucp> kent@lloyd.UUCP (Kent Borg) writes: > >> In the hook routine for SFPGetFile I can find out the name of the >> currently highlighted file by looking at reply.fName. ... >> I don't know how to find out what directory it is in. ... >I think you're out of luck here. Standard File doesn't even make the working >directory until the very end. While it is running it is using the Directory >ID stuff (see Inside Mac, Volume IV, top of page 92). The Directory ID of >the current directory is stored at -616(A6) in Standard File's stack frame, >but it would be a bad mistake to rely upon this information. Tim Maroney sent me mail and tech note 80 agrees (as I suspect does the Standard File chapter of IM-IV--but I don't have it in front me right now): the dirID is in the low memory global CurDirStore and the negative of the volume reference number is stored in SFSaveDisk. My fear that I was either asking a question that had just been discussed or one that has an obvious answer if I only looked in the right place, was doubly borne out. Sorry to add to the noise (red face), will look much more carefully next time. Thanks. Kent Borg kent@lloyd.uucp or ...!husc6!lloyd!kent