next up previous contents
Next: Program appearance Up: Introduction Previous: the programming language REC

the NeXTSTEP operating system

One of the principal advantages of the NeXTSTEP operating system is its use of the PostScript language for all input and output. All includes displaying information on the monitor, reading and writing files from disk, the expected task of printing files on a printer, and even includes transmitting them by modem. Amongst the agreeable conveniences is not having to struggle with a screen dump to save information which was originally presented visually.

The appearance which NeXTSTEP presents to the user is a File Viewer which is a window filled with either icons or text, as the user prefers. Moving a cursor by mouse (or sometimes keyboard arrows) indicates a choice of file, each one of which responds in its own manner to clicking or dragging. If it is a subdirectory, additional details are shown; if it is a text file, a page will be opened for editing, while programs will simply be loaded and executed.

Besides the TextView window, almost always overlaid as soon as programs begin to execute, there is room around the margins for icons reminding the user of programs and text files which have been held in abeyance, for frequently used programs, and the like. Some space is reserved in the upper left hand corner for the operational menu of the program being executed.

In addition to the mere operating system, which loads and executes programs and interchanges information between different locations, there is an extensive collection of service programs, ranging from language compilers to spelling checkers and even a copy of the Bible. Two of the more important utilities are the Program Manager and the Interface Builder.


  
Figure 1: A REC/C program, running against a background consisting of the File Viewer and some other programs.
\begin{figure}
\centering
\begin{picture}
(406,320)
\put(0,0){\epsfxsize=406pt \epsffile{running.eps}}
\end{picture}
\end{figure}

The Program Manager mostly checks dates on files, to be sure that the source code for a program is not more recent than the object code. To do so, it maintains lists of all kinds of associated material such as header files, icon images, sounds, and what not. The Interface Builder permits interactive programming, in the sense that windows can be created, stocked with assorted artifacts, and have them interconnected, all through the suitable interpretation of mouse movements. Much programming can be accomplished in those terms, at least during the stages of initial layout.

Going beyond simple tinkering, one needs to use the language Objective C which is a mixture of ${\sf C^{++}}$ and SmallTalk. The latter uses Methods, which are statements with the syntax [destination operation xxx :argument1 xxx :argument2 ...], where xxx denotes arbitrary intercalcated text, usually taking the form of helpful comments or comprising pieces of the body of a simple declaration in which the arguments are embedded. The destination is an Object, which is really a fancy name for a program to be executed1. SmallTalk envisioned parallel programming, in which several independent programs could communicate with one another by exchanging messages coordinating their activities.

A familiarity with Objective C will be necessary to follow the program listings which are about to be described. In the process it cannot be avoided noticing that NeXTSTEP already includes a vast number of predefined methods destined to manage the user interface. They are all located in a directory, together with supporting information, which can be consulted online, or selectively printed out for further enlightenment.


  
Figure 2: Main window for REC/C.nib, showing the ingredients of REC/C.
\begin{figure}
\centering
\begin{picture}
(200,240)
\put(0,0){\epsfxsize=200pt \epsffile{nib.eps}}
\end{picture}
\end{figure}


next up previous contents
Next: Program appearance Up: Introduction Previous: the programming language REC
Microcomputadoras
2001-02-12