As you explore the demos, you will frequently encounter dialog boxes and control panels. For example, the run command opens a control panel like the one shown above that, among other things, allows you to specify how long the simulation should run. Most of the control panels that you will encounter have been designed using an X window toolkit called Tk, and every effort has been made to follow the Motif design style. Hopefully, this will look familiar to most people.
Most of the items in a control panel are self-explanatory. Consider the run control panel shown on
page 2-9. The button with the double relief (the GO button) is the default button. Hitting the return key has the same effect at clicking the mouse on this button. A different type of button is the "check button", labeled "Debug". Clicking on this button expands the control panel, as shown below, giving the user options that are sometimes useful in debugging a complex application.
The "Animation" buttons show (textually or graphically) which blocks are running at any given time. Graphical animation will dramatically slow down a simulation, so it is not advised except for occasional use. It is often useful in combination with the In addition, using the mouse, you can position the cursor anywhere in the text to begin editing by clicking the left button. For example, to enter a new number for "when to stop", position the cursor in the number box and type control-k followed by the new number. You can then push the GO button (or type return) to run the application the specified number of iterations.
STEP button, which will fire stars one a time.
END button terminates the simulation as of the point currently reached, but then it runs the
wrapup methods of the stars, just as if the simulation had ended normally. Thus, it is an invasive alteration of the behavior of the simulation. The results displayed during
wrapup may be subtly or wildly different from the results that would have been obtained if the simulation had been allowed to proceed to its scheduled end time. Some of the demos will in fact deliver incorrect, or at least unexpected, results if stopped early.
END button differs from the
ABORT button in that the
END button calls the
ABORT does not. Thus, for example, signal plots that normally appear at the end of a simulation will not appear when
ABORT is used.
Clicking on the
Debug button a second time will reduce the control panel to its previous form.
Many control panels have text widgets. In the control panel above, for example, the box labeled "When to stop" is a text widget. To change the number, you must use Emacs-like editing control characters. These are summarized in table
Many control panels have more than one text widget. The current field is the one with the cursor, and anything you type will go into it. To change the current field to a different one, move the mouse or use the "Tab" key to move to the next one.
Although we have been working hard to eliminate them, a few old-style dialog boxes based on the Athena widgets from MIT still survive in the system. You will recognize these immediately because they are much uglier and more difficult to work with than the Tk-based widgets. Here is an example:
The text widgets in these dialog boxes also use Emacs-style commands. However, do not type return; this adds a second line to the dialog entry, which for most commands is confusing at best. If you accidentally type return, you can backspace sufficiently to get back to one line. Meta-return is the standard way to invoke the "OK" button in these widgets.
Copyright © 1990-1997, University of California. All rights