home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / next / programm / 7760 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  1.5 KB

  1. Path: sparky!uunet!rosie!next.com
  2. From: jgreen@next.com (Jack Greenfield)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: IndexingKit query language problem
  5. Message-ID: <6055@rosie.NeXT.COM>
  6. Date: 15 Dec 92 21:30:08 GMT
  7. References: <1992Dec7.222214.14970@cubetech.com>
  8. Sender: news@NeXT.COM
  9. Lines: 22
  10.  
  11. In article <1992Dec7.222214.14970@cubetech.com> andrew@cubetech.com  
  12. (Andrew Loewenstern) writes:
  13. > On the other hand, I can't seem to get nested objects to work well...
  14. > I have an object, which conforms to the IXRecordTranscription protocol
  15. > that has a List as an ivar.  All of the objects in the list conform to
  16. > IXRecordTranscription as well.  When I add the first object as a
  17. > record to an IXRecordManager, it get's archived, but the List within
  18. > does _not_....  Any ideas??
  19.  
  20. The fast transcription performed on objects conforming to the protocol  
  21. does not follow id's, structures or pointers to void.  To transcribe a  
  22. graph of objects, you must either: (a) use archiving (i.e., don't  
  23. implement the protocol), and pay the performance hit, or (b) follow the  
  24. graph in the sender:willWriteRecord: and sender:didReadRecord: methods.
  25.  
  26. Since the record manager is passed to these methods as the first argument,  
  27. you can recursively write out the graph with [sender addRecord:anObject]  
  28. or [sender replaceRecord:rn with:anObject].  In the latter case, you need  
  29. to know anObject's record number.  Try creating a simple super class that  
  30. knows it's record number and make your record classes inherit from it.
  31.  
  32. J.
  33.