From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Seitz To: Nicholas_Karagas@cirilium.com Cc: insight@sourceware.cygnus.com Subject: Re: modal dialog boxes Date: Wed, 21 Jun 2000 08:40:00 -0000 Message-id: <3950E1E8.227512D9@firetalk.com> References: X-SW-Source: 2000-q2/msg00296.html Nicholas_Karagas@cirilium.com wrote: > > Hello again... > > This time my problem is with modal dialog boxes (modal.tcl). How can I > pass the on_top parameter to the post method of ModalDialog? For instance, > I want the ignorable warning message dialog boxes (warning.tcl) to always > pop to the top, or else they can get covered by another Insight window, and > there's problems (this is all under NT, btw). I tried making the "after > 500 keep_raised $top" in ModalDialog::post unconditional, and this works > great for the warning dialogs, but it breaks the combo boxes in the target > selection dialog box (and probably numerous other places). Can anyone > help? > Ummm... You mean you want to ModalDialog::post to execute the "after 500 keep_raised $top" stuff?? Tcl has default values, just like C++. ModalDialog::post is declared as: class ModalDialog { public method post {{on_top 0}} {} } This is the same as the following in C++: class ModalDialog { public: void post (bool on_top = false}; }; It works, the same way, to: set dialog [MyDialog ] $dialog post 1; # on_top is 1 $dialog post; # on_top defaults to 0 Keith