home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!munnari.oz.au!metro!seagoon.newcastle.edu.au!wombat.newcastle.edu.au!phshl
- From: phshl@wombat.newcastle.edu.au (S.H. LEE (61) 49 21 5566)
- Subject: Problem with Stream
- Message-ID: <1992Aug26.225758.1@wombat.newcastle.edu.au>
- Lines: 36
- Sender: news@seagoon.newcastle.edu.au
- Organization: University of Newcastle, AUSTRALIA
- Date: Wed, 26 Aug 1992 12:57:58 GMT
-
- Hi guys,
- this is a question about Stream. I am new to tp6 OOP, so please
- bear with me.
-
- I've defined an object TTS which contains a Collection, among other things:
-
- TTS = object(Tdialog)
- data : PCollection;
- ...
- procedure store(var s : TBufStream);
- ...
-
- end;
-
- procedure tts.store(var s : TBufStream);
- begin
- TDialog.store(s);
- s.write(num, sizeof(num));
- ...
-
- end;
-
-
- the questions are,
-
- 1. how do I store the PCollection variable? data^.store(s) ?
- 2. When I tried to put the TTS object onto a stream in tyhe main
- program, an empty file was created. If I deleted the first line
- TDialog.Store(s) from the store procedure, a file of will be
- created properly. Anyone know the reason?
-
- thanks in advance.
-
- Lee.
-
-
-