Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: getting the necessary vRefNum (once we find the flashlight!)... Message-ID: <8418@hoptoad.uucp> Date: 29 Aug 89 16:54:07 GMT References: <48131@tiger.oxy.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 19 In article <48131@tiger.oxy.edu> sonenbli@oxy.edu (Andrew D. Sonenblick) writes: > Ok, you're a happy-go-lucky application on a Macintosh, eager to please > your use in any way you can. Suddenly, your user types in the name of > a file which s/he _knows_ is on the current volume, and wants you to > return the vRefNum that corresponds with that file--in other words, the > vRefNum such that the call SetVol(0,vRefNum); would ensure that the call > OpenResFile(&fileName); would not return FileNotFound error. What would > your code look like... keeping in mind that no calls to SFPut/GetFile > are ever executed... You're eager to please the user in any way you can. So you force her to type in names of existing files and you don't use Standard File. What's wrong with this picture? -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "It is better to be a human being dissatisfied than a pig satisfied; better to be Socrates dissatisfied than a fool satisfied." -- John Stuart Mill, UTILITARIANISM (1863)