WebCommandWinclass
Command Window. This object keeps track of the state of command window within the web UI.
class
WebCommandWin
:
WebWindow
Superclass Tree (in declaration order)
WebCommandWin
WebWindow
WebResourceResFile
WebResource
` object`
Subclass Tree
(none)
Global Objects
Summary of Properties
isInputOpen
lastInput
lastInputClient
lastInputReady
mode
moreMode
outbuf
scrollback
scrollbackLimit
src
textbuf
vpath
Inherited from WebWindow
:
name
pathName
sthCtx
Inherited from WebResourceResFile
:
binaryExts
browserExtToMime
Inherited from WebResource
:
group
priority
Summary of Methods
cancelInputLine
clearWindow
endMoreMode
flushWin
getInputLine
getState
receiveInput
showMorePrompt
textbufToScrollback
write
Inherited from WebWindow
:
processName
sendWinEvent
sendWinEventTo
winFromPath
Inherited from WebResourceResFile
:
isTextFile
matchRequest
processRequest
Inherited from WebResource
:
sendAck
sendXML
Properties
isInputOpen
Is an input line open? This is true between sending an <inputLine> event and either getting a reply, or explicitly sending a close or cancel event.
lastInput
the text of the last input line we received from the client
lastInputClient
client session who sent the last input line
lastInputReady
is input ready?
mode
Current UI mode. This is ‘working’ if the program is running and in the process of computing and/or generating output; ‘inputLine’ if we’re waiting for the user to enter a line of input; ‘morePrompt’ if we’re showing a “More” prompt.
moreMode
flag: we’re in More mode
outbuf
pending output buffer, since last flush
scrollback
Scrollback list. After each input, we add the contents of ‘textbuf’ to this list. If this pushes the list past the limit, we drop the oldest item. This is used to reconstruct a reasonable amount of scrollback history when a new client connects, or when an existing client refreshes the page.
scrollbackLimit
The scrollback limit, as a number of command inputs. Each input interaction adds one item to the scrollback list. When the number of items in the list exceeds the limit set here, we drop the oldest item.
src
OVERRIDDEN
no description available
textbuf
main window text buffer since last input read
vpath
OVERRIDDEN
my virtual path, and the actual resource file location
Methods
cancelInputLine (reset)
Cancel an input line that was interrupted by a timeout
clearWindow ( )
OVERRIDDEN
Clear the window
endMoreMode ( )
receive notification from the client that the user has responded to the More prompt, ending the pause
flushWin ( )
OVERRIDDEN
Flush the buffers
getInputLine (timeout?)
Read a line of input in this window. Blocks until the reply is received. Returns nil on timeout.
getState (client)
OVERRIDDEN
Get the state of this command window
receiveInput (req, query)
Receive input from the client
showMorePrompt ( )
Show a “More” prompt
textbufToScrollback (cmd)
Move the current text buffer contents to the scrollback list. If this would make the scrollback list exceed the limit, we’ll drop the oldest item.
‘cmd’ is the command line text of the last input. We include this in the srollback list with special tagging so that the UI can display it in a custom style, if it wants.
write (txt)
OVERRIDDEN
Write to the window
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3