Next: Navigation in the inspection manager
Up: Components of the Virtual Laboratory
Previous: The Script Editor
All objects in an Oorange network are subject to inspection . The network editor maintains a current selection, and this node is always inspected in the Oorange inspection manager. The inspected object is not always a node, as the following discussion will make clear.
The inspection manager queries the inspected object for its inspection command. This is expected to be a Tcl command which when executed will yield a set of panels of Tk widgets that represent the state of the object. The inspection manager then controls the display of these panels. In order to take advantage of the object hierarchy, Oorange implements its object inspectors using iTcl package , an object-oriented version of Tcl. In this way, a class hierarchy of inspectors is built which mirrors the class hierarchy of Objective C.
Normally, exactly one panel is displayed at one time in the inspector manager. If the user desires to have a particular panel persist, he can add it to a ``hot-list'' which contains a list of commonly inspected panels. This avoids the proliferation of panels that, like a littered laboratory bench, can sabotage the experimental task.
The inspector for a class allows the user to inspect the state of the instance variables for a given instance of the class, and when appropriate, to edit that state. The inspection process depends on whether the instance variable is itself an instance of an Objective C class (see Section 3.3.1).
Any editing performed on an object within the inspector manager will trigger the network update mechanism. This feature can be temporarily disabled if several edits are desired before update occurs. Editing commands can be automatically appended to the script of the node if a record of the edit is desired.
There is an Oorange protocol OoClassFields which frees the programmer from writing his own inspectors. Classes which conform to the protocol will receive a default inspector which they can customize as required.
Another feature of the Oorange inspection process allows developers of complicated nodes to make the node appear like a simple node to the inspection process. This is achieved by so-called file cabinets which encapsulate in a single flat list, all the interesting objects contained anywhere within the sub-network lying inside the node. For example, Figure 3 shows the file cabinet interface to the standard SceneViewer node. Developers who wish to add this feature to a node are only required to define a fileCabinet method in the node script.
It is also possible to create inspection panels directly in the node script without basing them on a Objective C object. Such panels are called private panels. For example, a Tcl variable rather than an Objective C object may be used to control the behavior of a node. It is possible then to create an inspector panel which allows editing of the value of this variable by implementing an inspect method for the node script.
Copyright © 1997 Sonderforschungsbereich 288, Differential Geometry and Quantum Physics, TU-Berlin