ba0k+@andrew.cmu.edu (Brian Patrick Arnold) (10/04/89)
Hello there, does anybody know about an XFCN that will return the path name of the blessed system folder? I am writing a file-based interapplication communications (IAC) between an application "Demos" and a HyperCard stack. The IAC is presently achieved from the working directory, but I'd like for it to be able to deal with shared, locked volumes, e.g., eventually run via an AppleShare server. So I want to work through the blessed folder. The application "Demos" has already been modified to use the MacApp gConfiguration.sysVRefNum which was obtained through SysEnvirons. What I now need is for my HyperCard stack to do a similar thing so they can "talk" again. Pieces to the solution of this simple puzzle must include SysEnvirons() for the blessed folder vRefNum and File manager calls to milk the vRefNum into a file path name, which HyperCard enjoys better than vRefNums (snarl). Has anyone already done this? If I try it, I want to ask 3 things: (1) does my approach sound correct, (2) I've never milked vRefNums before so can anybody give me tips, and (3) is anyone else interested in such an XFCN if I do it right? BTW: Whenever I use the blessed folder in "Demos" to create and destory temporary files, I seem to need to also use the following for it to work: GetVol(saveVol)/SetVol(sysVol)/...(my_stuff).../SetVol(saveVol) for file writing or deletion to work. Am I doing something wrong or do I really need to call these? - Brian
ba0k+@andrew.cmu.edu (Brian Patrick Arnold) (10/05/89)
I'm Re:'ing my own message about HyperCard getting the path of the system folder, because the XFCN I proposed writing was easier to do than I previously thought. For anyone who's interested, I wrote an XFCN BlessedFolder() which is a hack of PROCEDURE BuildPathName from Andrew Gilmartin's / Steve Maller's FileName() XFCN source, and it works. I owe this XFCN's success to their work. I also wrote an XFCN RealName() which returns the real name of the HyperCard application. This peeks the CurApName low memory global StringPtr listed in Inside Mac vol. III. Well, I needed to have this capability... Send me mail and I'll send you the source or XFCNs, or maybe I'll make a simple stack, attach the XFCNs and archive it. - Brian