Constructs related to ::tycho::YesNoQuery


Related class: ::tycho::YesNoQuery Contents: Proc

Proc

::tycho::askuser {question}
Ask the user a question, and return 0 or 1 for answers No and Yes. This is done by opening a modal dialog box ("modal" means that nothing further happens in this thread of control until this dialog box is dismissed).

This procedure indirectly calls update, a Tk utility that processes pending events, including mouse events. If this procedure is called from within an Itcl object, directly or indirectly, it may be necessary to take precautions to prevent the calling object from being deleted during the call. Because of a defect in at least some versions of Itcl, failure to do so can result in catastrophic failure of the application (a core dump). In Tycho objects, the safeEval method should be used to evaluate this procedure or any method or procedure that in turn calls this procedure. If the procedure is called from the top level or from a Tcl procedure that is not itself called from within an Itcl object, then there is no cause for worry.

Index of classes



Author: Wan-Teh Chang, Joel King, and Edward A. Lee
Version: @(#)YesNoQuery.itcl 1.15 11/12/96
Copyright: (c) 1995-1996 The Regents of the University of California.