home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 13879 < prev    next >
Encoding:
Text File  |  1992-08-12  |  1.3 KB  |  49 lines

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!uwm.edu!ogicse!reed!chaffee
  2. From: chaffee@reed.edu (Alex Chaffee)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Persistence in Think Class Library
  5. Message-ID: <1992Aug12.162409.4426@reed.edu>
  6. Date: 12 Aug 92 16:24:09 GMT
  7. References: <1992Aug9.170900.24145@reed.edu>
  8. Organization: Reed College, Portland, OR
  9. Lines: 38
  10.  
  11. Thanks to everyone who responded. The overwhelming consensus seems to be, go
  12. ahead and modify the TCL, just be careful. Useful tips include writing a
  13. separate file and #including it in the TCL file, and/or heavily commenting
  14. the changes so they won't be overlooked when an upgrade comes along.
  15.  
  16. Another suggestion (made by a co-worker) is this: make a new *superclass*
  17. for CObject.
  18.  
  19. ## CMyObject.h :
  20.  
  21. class CMyObject {
  22.     Handle Wrap(void);
  23.     void Unwrap(Handle h);
  24. }
  25.  
  26. ## CObject.h :
  27.  
  28. #include <CMyObject.h>
  29.  
  30. class CObject : public CMyObject {
  31. ...
  32.  
  33.  
  34. It's a kludge, but so is mucking with CObject.c.
  35.  
  36. So which kludge is cleaner?
  37.  
  38.     "In our experience, we find multiple inheritance to be like a
  39.      parachute: you don't always need it, but when you do, you're really
  40.      happy to have it on hand."
  41.         - Grady Boch, "Object Oriented Design"
  42.  
  43.  - Alex
  44. -- 
  45. Alex Chaffee
  46. chaffee@reed.edu
  47. Reed College, Portland OR 97202
  48. ____________________
  49.