From: Jeff Hobbs Date: Wed, 23 Jan 2013 01:19:51 +0000 (+0000) Subject: * tkcon.tcl (tkcon show): catch deiconify as it will throw an X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=2a24ec5363ffeeeb06930a890724294f580dfaad;p=tkcon * tkcon.tcl (tkcon show): catch deiconify as it will throw an error if tkcon is embedded. --- diff --git a/ChangeLog b/ChangeLog index fae07c9..e22c844 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-01-22 Jeff Hobbs + + * tkcon.tcl (tkcon show): catch deiconify as it will throw an + error if tkcon is embedded. + 2012-12-27 Jeff Hobbs * tkcon.tcl (edit): add support for ::tkcon::OPT(tabspace) to diff --git a/tkcon.tcl b/tkcon.tcl index c859a54..ee6a6c1 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -3683,8 +3683,8 @@ proc tkcon {cmd args} { if {![winfo exists $PRIV(root)]} { eval [linsert $args 0 ::tkcon::Init] } - wm deiconify $PRIV(root) - raise $PRIV(root) + # this may throw an error if toplevel is embedded + catch {wm deiconify $PRIV(root); raise $PRIV(root)} focus -force $PRIV(console) } ti* {