home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!hal.com!decwrl!waikato.ac.nz!ldo
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Is the Finder's name always "Finder"?
- Message-ID: <1993Jan25.145743.13420@waikato.ac.nz>
- Date: 25 Jan 93 01:57:43 GMT
- References: <01050133.og3hb4@distant.uucp>
- Organization: University of Waikato, Hamilton, New Zealand
- Lines: 35
-
- In article <01050133.og3hb4@distant.uucp>, edw@distant.uucp (Ed Watkeys) writes:
- >
- > In article <walkerj.727644025@milo.math.scarolina.edu> (comp.sys.mac.programmer), walkerj@math.scarolina.edu (Jim Walker) writes:
- >>
- >> I see that Finder's name is locked (under System 7), but is that always the
- >> name, even under foreign system software? If not, what is the best way to
- >> get the name? (I know how to read it from the boot blocks, and I know that
- >> there is a low-memory global FinderName, but I wonder if there is a better
- >> way.)
- >>
- >
- > Since the signature stays the same (I assume), you can get it's name by
- > cycling through GetNextProcess() (IM VI 29-11) until you find the Finder's
- > process serial number and then use GetProcessInformation() (IM VI 29-10)
- > to get its name. Of course, if the Finder isn't running, you're screwed in
- > this case.
- >
- > Using PBCatSearch() (IM VI 25-40) would work in all cases, as far as I can
- > see. Just set the criteria to be the Finder's type/creator, and let it go.
-
- I would say: stick with the low-memory global approach. If you do anything
- more complicated, you risk coming up with a different answer from what the
- system would. For example, a catalog search could be confused by multiple
- Finders on the boot disk.
-
- On the other hand, the right answer really depends on what you want to do
- with it. If you use the FinderName, then you will also respect any substitutions
- of the standard Finder by alternative special-purpose programs. If the Finder
- substitute lacks some function that you're assuming is present, you may be
- in trouble.
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
-