home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!destroyer!fmsrl7!lynx!nmsu.edu!opus!trodgers
- From: trodgers@nmsu.edu (Thomas Rodgers)
- Subject: Re: Problem with Stream
- In-Reply-To: phshl@wombat.newcastle.edu.au's message of 26 Aug 92 12:57:58 GMT
- Message-ID: <1992Aug31.223042.1178@nmsu.edu>
- Sender: usenet@nmsu.edu
- Organization: NMSU Computer Science
- References: <1992Aug26.225758.1@wombat.newcastle.edu.au>
- Date: Mon, 31 Aug 1992 22:30:42 GMT
- Lines: 39
-
- > the questions are,
-
- >1. how do I store the PCollection variable? ...
-
- Well, its rather simple really.
-
- Suppose you have the following field in your object :
- TSomeObject = object
- goo : PCollection;
-
- constructor Load(var s : TStream);
- procedure Store(var s : TStream);
- end;
-
- The code for Store would be :
-
- procedure TSomeObject.Store;
- begin
- S.Put(goo);
- end;
-
- The code for Load would be
-
- constructor TSomeObject.Load;
- begin
- goo := S.Get;
- end;
-
- > 2. When I tried to put the TTS object onto a stream in the
- > main...(stuff deleted)
-
- I am not sure if this is your problem or not, but the defintion for
- store should go :
-
- procedure store(var s : TStream)
- NOT
- procedure store(var s : TBufStream)
-
- Tom.
-