An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit f4e93b94 authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

ENH: Handle tcl scripts when Tk does not exits

parent 2d38eca6
# a generic interactor for tcl and vtk
#
if {[ info commands wm ] != ""} {
catch {unset vtkInteract.bold}
catch {unset vtkInteract.normal}
catch {unset vtkInteract.tagcount}
......@@ -98,3 +100,6 @@ proc vtkInteract {} {
wm withdraw .vtkInteract
}
vtkInteract
} else {
puts "Cannot use Interactor since TK does not exists"
}
......@@ -5,14 +5,16 @@ catch {
unset __tk_error
}
if {[catch {
package require Tk
} errormsg]} {
if {[::vtk::load_component tk] != ""} {
puts $errormsg
puts "Tk was not found: the VTK rendering package can not be used... Please check that your Tcl/Tk installation is correct. Windows users should also check that the program used to open/execute Tcl files is the Tk shell (wish), not the Tcl shell (tclsh)."
set __tk_error 1
}
if {[info commands vtkTkRenderWidget] != ""} {
if {[catch {
package require Tk
} errormsg]} {
if {[::vtk::load_component tk] != ""} {
puts $errormsg
puts "Tk was not found: the VTK rendering package can not be used... Please check that your Tcl/Tk installation is correct. Windows users should also check that the program used to open/execute Tcl files is the Tk shell (wish), not the Tcl shell (tclsh)."
set __tk_error 1
}
}
}
namespace eval ::vtk::rendering {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment