Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!oliveb!apple!well!svc From: svc@well.UUCP (Leonard Rosenthol) Newsgroups: comp.sys.mac.programmer Subject: Re: Scrap Management, User Preferences Summary: What about SysVRefNum Message-ID: <11470@well.UUCP> Date: 30 Apr 89 20:31:11 GMT References: <1833@etive.ed.ac.uk> <28905@ucbvax.BERKELEY.EDU> <28956@ucbvax.BERKELEY.EDU> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 27 In article <28956@ucbvax.BERKELEY.EDU>, oster@dewey.soe.berkeley.edu (David Phillip Oster) writes: > In article <1867@etive.ed.ac.uk> nick@lfcs.ed.ac.uk (Nick Rothwell) writes: > > >>A file, either data or resoruce, that you find using poor-man's-search-path, > >I presume you mean a hard-wired path like "::System Folder:Config" or > >something... > > No, don't do anything that perverse. > Just FSOpen(), OpenResFile(), or OpenRFPerm() the file normally. If the > system can't find it in the current folder, it will look in the System > Folder. > If I were you, I would NOT rely on the PMSP (poor man search path) as I would assume that it will disappear in the future (it is SUCH A HACK!). Instead why not use SysEnvirons to get the blessed Folder's RefNum (from field sysVRefNum) and then do a SetVol to get to that volume (don't forget to save the previous volume and restore it when done!) This will make you code a LOT MORE compatible in the future should things like the PMSP disappear - it also makes it more intuitive as to what you are ACTUALLY doing! -- +--------------------------------------------------+ Leonard Rosenthol | GEnie : MACgician Lazerware, inc. | MacNet: MACgician UUCP: svc@well.UUCP | ALink : D0025