Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Michael Mellinger
Mon, 17 Aug 1992 21:14
[textObj1 readRichText:[textObj2 stream]]
Author: Michael Mellinger
Date: Mon, 17 Aug 1992 21:14
Date: Mon, 17 Aug 1992 21:14
9 lines
826 bytes
826 bytes
When I try to set the text of one text object to be that of another text object (the subject line puts it simpler), I get all of the text but the linefeeds are missings, including the hard returns at the end of paragraphs. Is there something obvious that I'm overlooking when trying to copy the text from one text object to another? I hope that I'm not going to get stuck looking at theBreaks variable in the Text object and pulling each line out one by one. -Mike
Re: [textObj1 readRichText: [textObj2 stream]]
Author: simsong Simson L. Garfinkel
Date: Tue, 18 Aug 1992 13:48
Date: Tue, 18 Aug 1992 13:48
27 lines
1546 bytes
1546 bytes
In article <1992Aug17.211456.14181@Trirex.COM> mmelling@Trirex.com (Michael Mellinger) writes: > When I try to set the text of one text object to be that of another text > object (the subject line puts it simpler), I get all of the text but the > linefeeds are missings, including the hard returns at the end of > paragraphs. Is there something obvious that I'm overlooking when trying > to copy the text from one text object to another? I hope that I'm not > going to get stuck looking at theBreaks variable in the Text object and > pulling each line out one by one. > > -Mike This isn't the approved way to do this. Sadly, you've got to write the first Text object into a memory buffer, than read it out. Try this: NXStream *str = NXOpenMemory(0,0,NX_READWRITE); [text1 writeRichText:str]; NXSeek(str,0L,NX_FROMSTART); [text2 readRichText:str]; NXCloseMemory(str,NX_FREEBUFFER); It's still quite zippy. -- ................................................................simson
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads