next up previous
Next: Phase window, solution window Up: Program Appearance Previous: Text windows

Browsers


  
Figure 6: The REC holding window, which contains two alternative Views, one at a time of which will be placed in the main window..
\begin{figure}
\centering
\begin{picture}
(406,260)
\put(0,0){\epsfxsize=406pt \epsffile{holding.eps}}
\end{picture}
\end{figure}

Browsers are another aspect of the operating system which can be incorporated in application programs at the programmer's desire; the procedure is much the same as for coupling text fields to files; namely to copy a browser which is already working, or to look it up in a textbook. The new browser program has to supply the text (or even icons) that the browser will display, which is accomplished by delegation. A delegate can be associated with an object by mouse dragging in the interface builder, or set up through programming.

A delegate is expected to provide methods which could have been incorporated in the delegating program, but for some reason, weren't. The principal reason is that there was no way of forseeing, when the master program was written, exactly what the methods were supposed to do. After all, each application will have its own items to display, and its own reactions to their selection; such information is best incorporated in the application program itself.

Looking around the REC-R main window, another text field can be seen; one which is used for holding error messages and comments, and especially, displaying the definition of REC operators. In fact, there is a whole button array bearing the three printable quadrants of the ASCII alphabet, whose sole purpose is to provide these reminders to the user. Although there is no requirement within the language to do so, it is customary to use single letters (or ASCII characters) for the operators because of their convenience and ease of remembering. Of course, such a principle only works when there are enough letters to go around, which is one of the reason for tailoring individual REC programs instead of concocting a universal or general purpose REC.

The browser in the main window of REC-R is stocked with information of various types. The first item copies the header file which identifies the operators and predicates in REC-R, a variant of which has to be included in all REC programs. It supplements the button panel for REC definitions, because it is easier to scan a list of possibilities than to press the buttons one by one. On the other hand, for quick recollection or to identify an unfamiliar letter in a displayed program, the buttons are handier.

There are benefits to be had in stocking the browser with some simple and typical programs, so that REC-R can be tried out at once without having to worry about disk files or other extraneous factors.


next up previous
Next: Phase window, solution window Up: Program Appearance Previous: Text windows
Microcomputadoras
2001-01-10