From: Pat Thoyts Date: Sat, 19 Jul 2008 22:25:10 +0000 (+0100) Subject: Fixed problem activating hidden tabs. X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=1746aa8159303f84731ec3a1527efc4fd51267bb;p=Bullfrog Fixed problem activating hidden tabs. --- diff --git a/bin/tab.tcl b/bin/tab.tcl index a4c37aa..9d838fc 100644 --- a/bin/tab.tcl +++ b/bin/tab.tcl @@ -122,7 +122,6 @@ proc ::ButtonNotebook::Drag {w x y rootX rootY} { if {[winfo containing $rootX $rootY] eq $w} { set index [$w index @$x,$y] if {$index != $state(drag_under)} { - puts "moved to $index" place $state(drag_indic) -anchor nw -x $x -y 0 set state(drag_under) $index } @@ -191,8 +190,10 @@ proc ::ButtonNotebook::Detach {notebook index} { event generate $tab <> } proc ::ButtonNotebook::Debug {notebook msg} { - $notebook.page0.text insert end $msg\n {} - $notebook.page0.text see end + if {[winfo exists $notebook.page0.text]} { + $notebook.page0.text insert end $msg\n {} + $notebook.page0.text see end + } } # Attach a toplevel to the notebook @@ -248,4 +249,7 @@ proc ::ButtonNotebook::Test {} { } ::ButtonNotebook::Init 1 -if {[winfo class .] eq "Tab"} {::ButtonNotebook::Test; tkwait window .} \ No newline at end of file + +# The following line causes the Test procedure to be run if this file +# is run standalone. +if {[winfo class .] eq "Tab"} {::ButtonNotebook::Test; tkwait window .}