Message Classes

The dialog procedures that post messages for the user are based on Itcl classes described below. These classes can also be invoked directly by the user, providing much more flexibility. They also serve as base classes for more elaborate dialogs.

Message Class

Many messages require an "OK" button that has the effect of dismissing the message. The Message class is derived from Dialog and adds this feature.

::tycho::Message .x -text {A simple message window}
wm deiconify .x
Of course, you can also add buttons to this using the addButton method:
.x addButton pushme -text {Push Me} -command {::tycho::post thanks}

ErrorMessage Class

The class ErrorMessage is derived from Message and simply adds the "Stack Trace" button.

::tycho::ErrorMessage .xx -text {An error message}
wm deiconify .xx
It rarely (if ever) makes sense to directly create an instance of the ErrorMessage class. Use error instead (see error handling).

Tycho Home Page


Copyright © 1996, The Regents of the University of California. All rights reserved.
Last updated: 96/11/30, comments to: eal@eecs.berkeley.edu