home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20265 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.2 KB  |  41 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!world!zobkiw
  3. From: zobkiw@world.std.com (Joe Zobkiw)
  4. Subject: Gestalt Selectors in APPL
  5. Message-ID: <BzqC31.FAM@world.std.com>
  6. Organization: The World Public Access UNIX, Brookline, MA
  7. Date: Wed, 23 Dec 1992 20:40:12 GMT
  8. Lines: 31
  9.  
  10. I need an application to install a gestalt selector. 
  11. I know I need to load it into the System Heap but I 
  12. have a few questions and comments.
  13.  
  14. 1) Can I perform a "6-byte-xdef" type trick on this 
  15. code? I'm not sure I can since even if I mark the 
  16. 6-byte resource as sysHeap the code it points to is 
  17. still in my application heap.
  18.  
  19. 2) If I place my Gestalt selector function in a separate 
  20. CODE resource, can I mark that resource as sysHeap and 
  21. have it work properly? This would be WITHOUT any 6-byte 
  22. tricks.
  23.  
  24. 3) How can I remove the Gestalt selector once the app 
  25. quits? Will
  26.  
  27.     err = ReplaceGestalt(selector, nil, &oldGestaltFunction);
  28.  
  29. work or will this cause the System to jump to location 0 
  30. the next time someone calls my selector?
  31.  
  32. What's the easiest way? Thanks in advance! :)
  33.  
  34. Joe Zobkiw
  35.  
  36. -- 
  37. -------------------------------------------------------------
  38. joe zobkiw         zobkiw@world.std.com        aol: aflzobkiw
  39.  
  40. macintosh.midi.synthesis.c.oop.asm.communications.graphics...
  41.