[vtk-developers] WM Withdraw

Sebastien BARRE sebastien at barre.nom.fr
Tue Aug 16 16:33:21 EDT 2005


At 8/16/2005 04:17 PM, Andy Cedilnik wrote:
>There is the following line in every test:
>
>wm withdraw .
>
>So, since this line explodes on non-tk builds, I will remove it from all
>the tests. That said, there is the same line in rtImageTest.tcl tcl test
>driver that drives most tcl tests. That one will do the special check to
>make sure Tk is set.
>
>So, this is heads up, tests in VTK are tests and not examples, so if you
>are running them without rtImageTest.tcl, they will pop-up the Tk window.
>
>Comments?

Yes, one should be able to run tests like examples (or more approriately, 
write an example that can be run as a test). Case in point, all examples in 
KWWidgets can be run with --test, because it makes no sense to write and 
maintain twice the same code that differ only by a few couple of lines...

Severals ways to solve it "wm withdraw .":
- test if you are in a Tk context (package, etc)
- test if the "wm" commands exit (info commands wm)
- put it inside catch {}




More information about the vtk-developers mailing list