Next: Object inspection
Up: Computational network manager
Previous: Computational network manager
The original impulse to use Tcl in Oorange networks was to provide editable update actions. This proved so effective that a much wider application of Tcl within the network manager eventually took form. In fact, Tcl scripts became the archiving medium for Oorange networks. As users construct or edit networks in the network manager, a Tcl script is generated which describes the state of the network as a sequence of Objective C commands (using libtclobjc - see Section 3.1.2). Because these scripts play such an important role in the experimental process, they have been separated out from the standard inspection process and given their own top-level window, the Script Editor.
In the script editor the user can see a complete description of the currently selected node and the state of its objects. For example, in the figure above, the currently selected node is Surface; its script appears in the script editor to the right of the network manager.
Among the statements generated automatically in the network editor are those which describe the dependents and ingredients, the links, and the contents of the node. Others are provided by the node developer, in the form of Tcl procedures which provide customized node behavior. The nodeUpdate method is probably the most important of the latter, but there are others which are invoked, for example, in connection with animation, 3D picking, and node documentation. These scripts provide a powerful prototyping facility where ideas and algorithms can be developed and tested.
At the bottom of the script editor window is a shell where the user can type commands directly to the Tcl interpreter associated to the node. These commands are immediately executed.
It is important to note that it is possible to be a productive user of Oorange without learning Tcl or using the script editor. There are many predefined nodes and networks which can be hooked together without having to edit the attached scripts at all. And the subset of Tcl which is used in the scripts is almost identical to Objective C.
Copyright © 1997 Sonderforschungsbereich 288, Differential Geometry and Quantum Physics, TU-Berlin