StatusBox


Superclass: SCViewHolder


A GUI extension to copy messages that are posted to the post window into a graphical text box object.


Compatible with SwingOSC.



StatusBox(argParent, argBounds)


argParent -- the containing window or view

argBounds -- position and size



Manual posting:


You can post messages to the status box manually by calling "post" or "postln" on the status box itself, with the desired string as argument.


aStatusBox.post(str)

aStatusBox.postln(str)


Automatic posting:


If a given status box instance is set as default, any string that is posted to the post window will automatically appear in that status box as well.


aStatusBox.makeDefault -- Makes this status box the default

StatusBox.default -- Returns the current default status box

StatusBox.clearDefault -- Clears the default; stops automatic posting.


Automatic posting can handle only strings that are directed through the String post and postln methods. Direct output from primitives and messages posted by the server bypass this mechanism and cannot appear in the status box. This includes stack traces from error output, although the error message by itself should be displayed (except in the case of some primitive failure errors).



Example:


f = FlowView.new;

z = StatusBox(f, 250@250);

StatusBox.default === z // true; the first StatusBox you create is automatically the default


"Hello world".postln; // appears in post window and status box


z.postln("Hello world"); // appears only in status box


// close the window


StatusBox.default // is now nil -- removing the default status box clears the default