Article View: comp.sys.next.programmer
Article #1775LipService
From: Vince Demarco
Date: Mon, 16 Nov 1992 05:09
Date: Mon, 16 Nov 1992 05:09
45 lines
1832 bytes
1832 bytes
I have been writing a Cell for the text object, to implement a Next
Mail like lip services, thinggy.
So far everything works execept saving and retrieving the file (and
also copying and pasting the lips)
The problem is in my (read/write)RichText: methods in my custom Cell,
here is the code:
- readRichText:(NXStream *)stream forView:view
{
/******
printf("readRichText\n");
lipsImage = [NXImage findImageNamed:"lips"];
sound = [[Sound allocFromZone:[self zone]] init];
[sound readSoundFromStream:stream];
return self;
}
- writeRichText:(NXStream *)stream forView:view
{
if ([sound duration] <= 0.0){
printf("writing Empty Sound\n");
[[Sound findSoundFor:"sound.snd"] writeSoundToStream:stream];
}else{
[sound writeSoundToStream:streamtream];
}
return self;
}
The problem seems to be the Sound object isn't writing the Sound file
to the stream, so when the program attempts to read the sound file
from the stream it hangs.
I know that the above method, doesn't result in a text file being
produced, this isn't a problem in my case.
Does anyone have any suggestions???
vince
--
demarco@cpsc.ucalgary.ca
vince@whatnxt.cuc.ab.ca
Technical Details
Message-ID:
<DEMARCO.92Nov15220912@fsd.cpsc.ucalgary.ca>Path:
arc1-ca.pugleaf.net!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!demarcoReferences:
<1992Nov16.004343.669@bernina.ethz.ch>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!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 From: demarco@fsd.cpsc.ucalgary.ca (Vince Demarco) Subject: LipService In-Reply-To: root@cello.ethz.ch.'s message of Mon, 16 Nov 1992 00:43:43 GMT Message-ID: <DEMARCO.92Nov15220912@fsd.cpsc.ucalgary.ca> Sender: news@cpsc.ucalgary.ca (News Manager) Organization: University of Calgary References: <1992Nov16.004343.669@bernina.ethz.ch> Date: Mon, 16 Nov 1992 05:09:12 GMT Lines: 45