home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22093 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  2.2 KB

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