[comp.windows.x] refreshing windows

sassan@peritus.UUCP (Sassan Hazeghi) (08/18/88)

    We're having trouble getting X11R2 to do what we want to do; I wonder
if anyone who has solved a similar problem could provide a suggestion.

At the outermost level, we have a VPaned (Athena) widget, which
appears on the screen as a window divided into a number of
smaller windows.   We want one of the smaller windows to contain
Ascii text, and to be dynamically expanded by the application program
but not by the interactive user (think of it as an output file which is 
appended to by the program).   We haven't been able to get this to work
perfectly using an Athena Text widget, although it's pretty close; the main
problem is that there is no "refresh" primitive, so when you add text
it's hard to make the change appear on the screen.   The best
combination we've found works like this.  We declare the widget to be Read-only
mode with Disk source; when appending to the window, we open the disk file,
write to it, then close it; to refresh the window (shortly after appending)
we disassociate the file from the widget with XtDiskSourceDestroy, then 
reassociate it with XtDiskSourceCreate.  This causes the window to refresh
properly for a while, but when the window gets full enough, X seems to get lost
and produces a window full of ^@ (nulls) with some other interesting characters
thrown in.  Scrolling the window up and down fixes it, until the next refresh.
The same bug appears on a Sun 3/50 and a Tektronix 4317, so we think it's X.
We've tried a lot of variants:  Append and Edit modes, String source, 
XtTextReplace, XtTextDisplay (which is not documented, but appears in the
X source code), and even sending an "expose" event to the window.  We have
found no other combination that works even as well as the one described first.
(Closing and reopening the window, rather than the file, causes X to rearrange
all the other subwindows within the outer VPaned window, and is undesirable.)
Does anybody out there know how to make this work with a Text widget, or
failing that, does anybody have a widget definition that would work?

Please email any suggestions you may have and I'll post the "solution"
if others are interested.

Thanks,

Sassan Hazeghi.
 
...oliveb!peritus!sassan