From 2a24ec5363ffeeeb06930a890724294f580dfaad Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Wed, 23 Jan 2013 01:19:51 +0000 Subject: [PATCH] * tkcon.tcl (tkcon show): catch deiconify as it will throw an error if tkcon is embedded. --- ChangeLog | 5 +++++ tkcon.tcl | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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* { -- 2.23.0