Output Manager. This object contains global code for displaying text on the console.

The output manager is transient because we don't want its state to be saved and restored; the output manager state is essentially part of the intepreter user interface, which is not affected by save and restore.

transient outputManager :   object

Superclass Tree   (in declaration order)


Summary of Properties  

curOutputStream  htmlMode 

Summary of Methods  

setOutputStream  withOutputStream 



the current output stream - start with the main text stream

Is the UI running in HTML mode? This tells us if we have a full HTML UI or a text-only UI. Full HTML mode applies if we're running on a Multimedia TADS interpreter, or we're using the Web UI, which runs in a separate browser and is thus inherently HTML-capable.

(The result can't change during a session, since it's a function of the game and interpreter capabilities, so we store the result on the first evaluation to avoid having to recompute it on each query. Since 'self' is a static object, we'll recompute this each time we run the program, which is important because we could save the game on one interpreter and resume the session on a different interpreter with different capabilities.)


setOutputStream (ostr)output.t[54]

Switch to a new active output stream. Returns the previously active output stream, so that the caller can easily restore the old output stream if the new output stream is to be established only for a specific duration.

withOutputStream (ostr, func)output.t[75]
run the given function, using the given output stream as the active default output stream

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3