home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / pascal / 5072 < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.1 KB  |  47 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!munnari.oz.au!metro!seagoon.newcastle.edu.au!wombat.newcastle.edu.au!phshl
  3. From: phshl@wombat.newcastle.edu.au (S.H. LEE (61) 49 21 5566)
  4. Subject: Problem with Stream
  5. Message-ID: <1992Aug26.225758.1@wombat.newcastle.edu.au>
  6. Lines: 36
  7. Sender: news@seagoon.newcastle.edu.au
  8. Organization: University of Newcastle, AUSTRALIA
  9. Date: Wed, 26 Aug 1992 12:57:58 GMT
  10.  
  11. Hi guys,
  12.   this is a question about Stream. I am new to tp6 OOP, so please
  13. bear with me. 
  14.  
  15. I've defined an object TTS which contains a Collection, among other things:
  16.  
  17. TTS = object(Tdialog)
  18.        data : PCollection;
  19.        ...
  20.        procedure store(var s : TBufStream);
  21.     ...
  22.  
  23.        end;
  24.  
  25. procedure tts.store(var s : TBufStream);
  26. begin
  27.   TDialog.store(s);
  28.   s.write(num, sizeof(num));
  29.   ...
  30.  
  31. end;
  32.  
  33.  
  34. the questions are, 
  35.  
  36. 1. how do I store the PCollection variable? data^.store(s) ?
  37. 2. When I tried to put the TTS object onto a stream in tyhe main 
  38. program, an empty file was created. If I deleted the first line 
  39. TDialog.Store(s) from the store procedure, a file of will be
  40. created properly. Anyone know the reason?
  41.  
  42. thanks in advance.
  43.  
  44. Lee.
  45.  
  46.             
  47.