* SMG$ displays & asynch terminal output problem
@ 1991-10-29 21:42 Steve Hespelt
0 siblings, 0 replies; only message in thread
From: Steve Hespelt @ 1991-10-29 21:42 UTC (permalink / raw)
Fellow SMG$ users:
I apologize for the length of this message. Any shorter and required info might be missing.
Has anyone used SMG$ in the following manner: (it seems like a common use)
I have 3 displays defined for a given terminal (pasteboard). Two of these
displays are for output only. The third is the user input region. The output
regions have text written to them (via SMG$PUT_LINE() ) by AST routines reading
reply messages from remote tasks.
The problem I have (just an inconvience but a noticeable one) is that the
terminal output places the cursor in the corresponding output display region
while a terminal read (via SMG$READ_COMPOSED_LINE() ) is pending. The user may
even be typing a command when an output message is written to a display region.
This causes the command to appear fragmented on the screen. The users think
this is ugly and I have to agree. Of paramount importance is that output
messages are displayed immediately without waiting for the keyboard read to
complete.
I've tried a simple workaround to this. When the asynch input kicks off the
AST, the AST routine places the received message into a queue and then calls
SMG$CANCEL_INPUT(). I check the return status of SMG$READ_COMPOSED_LINE() for
the following: SS$_CANCEL & SS$_ABORT. If the status equals either of these,
then the code knows that input was cancelled because of an AST invokation. If
the SMG$READ_COMPOSED_LINE() was aborted/cancelled a routine is called which
will output the received message to the output display regions, then it will
post the keyboard read again using the initial-string argument set to be the
resultant-string from the interrupted previous keyboard read. Before the
keyboard read is posted again, the text, if any, that was entered by the user is
displayed in the keyboard input region. This should allow the user to simply
finish typing without having to re-enter the command.
This workaround failed. Whenever I used the initial-string argument, I got
an INVALID CHANNEL error. Perhaps I'm approaching the problem from the wrong
angle. This is the first & only program that I've been involved with SMG$
directly.
Eventually I'll be changing this particular user interface to use an X/Motif
interface which will isolate the message display from the keyboard reads via
different display windows.
Any suggestions on this problem would be greatly appreciated. Eventually
I'll be changing this particular user interface to use an X/Motif interface
which will isolate the message display from the keyboard reads.
Thanks for your time and assistance. Please send e-mail in response. If I succeede in a workaround, I'll post the solution.
-steve hespelt e-mail to fooz@elm.lle.rochester.edu
Laboratory for Laser Energetics __________\|/_
/|\
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1991-10-29 21:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1991-10-29 21:42 SMG$ displays & asynch terminal output problem Steve Hespelt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox