Next: Computational network manager
Up: Software ingredients
Previous: Objective C

Tcl

The other main language used in Oorange is Tcl [7, 14]. Roughly speaking, a Tcl layer handles all user interaction. As an interpreted language, Tcl is ideally suited to rapid prototyping and flexible configuration. The coordination of Tcl and Objective C is, as described below, one of the strong points of the design.

Oorange incorporates several Tcl packages or extensions to handle different needs. Tk is used to create and update all GUI widgets. Other packages are used to establish connections to the Objective C layer. iTcl, in conjunction with Tk, is used to provide a class hierarchy of inspector panels that mirrors the Objective C class hierarchy. libtclobjc [4] is a C library that allows Tcl interpreters to interact transparently with Objective C objects and vice-versa [12]. Each Objective C class and instance appears as a command to the Tcl interpreter. Users can then issue class or instance method calls to the Tcl interpreter, which parses them and dispatches them directly through to the Objective C runtime system. There is no need to register classes or methods with interpreters; this information is obtained ``for free'' by querying the Objective C runtime system. Oorange extends this facility so that references to classes which are not yet loaded will trigger dynamic loading of the required library. This interplay between Objective C and Tcl (Figure 2) is one of the most powerful features of Oorange and runs as a thread throughout the following discussion.

 TclOjbective-C Image

Users are not expected to be proficient in Tcl; it is an advanced skill.


Copyright © 1997 Sonderforschungsbereich 288, Differential Geometry and Quantum Physics, TU-Berlin