🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #2080

Re: IndexingKit query language problem

#2080
From: Jack Greenfield
Date: Tue, 15 Dec 1992 21:30
22 lines
1562 bytes
In article <1992Dec7.222214.14970@cubetech.com> andrew@cubetech.com  
(Andrew Loewenstern) writes:
> On the other hand, I can't seem to get nested objects to work well...
> I have an object, which conforms to the IXRecordTranscription protocol
> that has a List as an ivar.  All of the objects in the list conform to
> IXRecordTranscription as well.  When I add the first object as a
> record to an IXRecordManager, it get's archived, but the List within
> does _not_....  Any ideas??

The fast transcription performed on objects conforming to the protocol  
does not follow id's, structures or pointers to void.  To transcribe a  
graph of objects, you must either: (a) use archiving (i.e., don't  
implement the protocol), and pay the performance hit, or (b) follow the  
graph in the sender:willWriteRecord: and sender:didReadRecord: methods.

Since the record manager is passed to these methods as the first argument,  
you can recursively write out the graph with [sender addRecord:anObject]  
or [sender replaceRecord:rn with:anObject].  In the latter case, you need  
to know anObject's record number.  Try creating a simple super class that  
knows it's record number and make your record classes inherit from it.

J.
Technical Details
Message-ID: <6055@rosie.NeXT.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!rosie!next.com
References: <1992Dec7.222214.14970@cubetech.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!rosie!next.com
From: jgreen@next.com (Jack Greenfield)
Newsgroups: comp.sys.next.programmer
Subject: Re: IndexingKit query language problem
Message-ID: <6055@rosie.NeXT.COM>
Date: 15 Dec 92 21:30:08 GMT
References: <1992Dec7.222214.14970@cubetech.com>
Sender: news@NeXT.COM
Lines: 22