ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Aug/scrolling-text-views

This is scrolling-text-views in view mode; [Up]


Date: Sun 28-Aug-1989 15:14:42 From: Unknown Subject: scrolling text views Hello, I've recently implemented a read-only scrolling text display object class which simply takes a stream and spews its contents into a horizontally and vertically scrolling window. It's a subclass of ScrollView which creates for itself a Text object and a Window object. I initially developed this object class (ScrollText) so that I could monitor the stdout of a running process from within an application. Basically, the application would start the process with popen, open a NXStream on the file descriptor returned by popen (please let me know if there's a neater way to do this) and pass this stream to a newly instantiated ScrollText object. Well, oddly enough, it works. The window opens, the text eventually appears in the view and the scroll bars adjust their sizes appropriately. BUT....the problem is that nothing appears in the window until the process being monitored has terminated, i.e. until the Text object's appear asynchronously, as the process writes to stdout, instead waiting till the end. I guess what I'll need to do is make a subclass of Text with a modified readText: method, but I'm hoping there's an obvious and simpler solution (aren't we all?). Any ideas, folks? - Pete P.S. I know the Shell application does some of these things (how?), but I want something that's horizontally scrollable (as well as vertically), and read-only. Peter M. Yadlowsky | "Pay no attention to that man Academic Computing Center | behind the curtain!" University of Virginia | pmy@Virginia.EDU | >From: dz@pumpkin.ucsb.edu (Daniel James Zerkle)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.