home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18030 < prev    next >
Encoding:
Text File  |  1992-11-05  |  1.2 KB  |  32 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!caen!batcomputer!ghost.dsi.unimi.it!piovanel
  3. From: piovanel@ghost.dsi.unimi.it (marco piovanelli)
  4. Subject: Color Picker Package availability
  5. Keywords: Color Picker, System 6.0, Gestalt
  6. Organization: Computer Science Dep. - Milan University
  7. Date: Thu, 5 Nov 1992 14:26:58 GMT
  8. Message-ID: <1992Nov5.142658.7138@ghost.dsi.unimi.it>
  9. Summary: How to tell if the Color Picker is there?
  10. Lines: 20
  11.  
  12. A tiny question about the Color Picker package.  How can I tell
  13. if Color Picker calls (notably GetColor) are available?
  14. I tried various solutions:
  15.  
  16. 1. gHasColorPicker := gHasColorQuickDraw;
  17.  
  18.    Wrong.  The color picker is also available on non-CQD (68000) machines,
  19.    not only under sys 7.0 but (seemingly) under sys 6.0.x too.
  20.  
  21. 2. gHasColorPicker := TrapAvailable(_Pack12);
  22.  
  23.    I'm afraid this would set gHasColorPicker to TRUE in any case;
  24.    the package calls seem to be always implemented.
  25.  
  26. 3. gHasColorPicker := GetResource('PACK', 12) <> NIL;
  27.  
  28.    While this one seems to work, how about compatibility with future systems?
  29.  
  30. Any better solution?  A gestalt selector (hi Rene)?
  31. Please reply by email.  Thank you in advance.            -- marco
  32.