home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / next / programm / 7243 < prev    next >
Encoding:
Text File  |  1992-11-15  |  1.7 KB  |  58 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!gumby!destroyer!cs.ubc.ca!unixg.ubc.ca!kakwa.ucs.ualberta.ca!alberta!cpsc.ucalgary.ca!newshost!demarco
  3. From: demarco@fsd.cpsc.ucalgary.ca (Vince Demarco)
  4. Subject: LipService
  5. In-Reply-To: root@cello.ethz.ch.'s message of Mon, 16 Nov 1992 00:43:43 GMT
  6. Message-ID: <DEMARCO.92Nov15220912@fsd.cpsc.ucalgary.ca>
  7. Sender: news@cpsc.ucalgary.ca (News Manager)
  8. Organization: University of Calgary
  9. References: <1992Nov16.004343.669@bernina.ethz.ch>
  10. Date: Mon, 16 Nov 1992 05:09:12 GMT
  11. Lines: 45
  12.  
  13.  
  14. I have been writing a Cell for the text object, to implement a Next
  15. Mail like lip services, thinggy.
  16.  
  17. So far everything works execept saving and retrieving the file (and
  18. also copying and pasting the lips)
  19.  
  20. The problem is in my (read/write)RichText: methods in my custom Cell,
  21. here is the code:
  22.  
  23. - readRichText:(NXStream *)stream forView:view
  24. {
  25. /******
  26.     printf("readRichText\n");
  27.     lipsImage = [NXImage findImageNamed:"lips"];
  28.     sound = [[Sound allocFromZone:[self zone]] init];
  29.     [sound readSoundFromStream:stream];
  30.     return self;
  31. }
  32.  
  33. - writeRichText:(NXStream *)stream forView:view
  34. {
  35.     if ([sound duration] <= 0.0){
  36.         printf("writing Empty Sound\n");
  37.         [[Sound findSoundFor:"sound.snd"] writeSoundToStream:stream];
  38.     }else{
  39.         [sound writeSoundToStream:streamtream];
  40.     }
  41.     return self;
  42. }
  43.  
  44. The problem seems to be the Sound object isn't writing the Sound file
  45. to the stream, so when the program attempts to read the sound file
  46. from the stream it hangs.
  47.  
  48. I know that the above method, doesn't result in a text file being
  49. produced, this isn't a problem in my case.
  50.  
  51. Does anyone have any suggestions???
  52.  
  53. vince
  54.  
  55. --
  56. demarco@cpsc.ucalgary.ca
  57. vince@whatnxt.cuc.ab.ca
  58.