Path: utzoo!utgpu!watserv1!watmath!att!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!ucla-cs!ucla-seas!icsl.ucla.edu From: martin@icsl.ucla.edu (Kenneth Martin/) Newsgroups: comp.sys.next Subject: Connecting a Stream to a Text Object Message-ID: <1484@lee.SEAS.UCLA.EDU> Date: 28 Nov 90 06:30:30 GMT Sender: news@SEAS.UCLA.EDU Distribution: na Organization: ICSL Lab., EE Dept., University of California, Los Angeles Lines: 26 On page 10-4 of the Concepts manual, it says "You can also implement the functions needed to connect a stream to a different source or destination, such as a Text object, thereby creating your own type of stream." Unfortunately, two paragraphs later it says "The last section contains information about how to connect a stream to a source or destination other than memory, a file, or a Mach port. <>. Does anyone out there know how to connect a stream to a Text window for reading and writing? The Text window is a subwindow of a larger window. My best guess at the present time seems to be: 1) Open two Mach ports, one for reading and one for writing. (I'd greatly prefer to have one stream for both directions.) 2) Create a thread that reads from the one port and sends it to the Text window. 3) Create another thread that reads from the text window and sends it to the thread. 4) Somehow get all these things happening concurrently without any timing problems. I admit that I am very ignorant of Mach, threads, and Mach ports, but even so, this seems like an incredibly complicated and burdensome way to simply read and write through a stream to a Text window. Could anyone tell me if I'm way off base, or should I plug ahead? All comments are appreciated. Thanks. -Ken Martin: martin@icsl.ucla.edu