From 232cfdb6c86e8115a5c469f49e042f3ceb680703 Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Thu, 27 Dec 2012 22:22:49 +0000 Subject: [PATCH] * tkcon.tcl (::tkcon::InitUI): catch deiconify to prevent error when embedding. [Bug #44] --- ChangeLog | 3 +++ tkcon.tcl | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index be79a25..e548f4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-12-27 Jeff Hobbs + * tkcon.tcl (::tkcon::InitUI): catch deiconify to prevent error + when embedding. [Bug #44] + * tkcon.tcl (::tkcon::ExpandMethodname): improved expansion for xotcl methods. Also enhance expansion to allow break/continue signals to differentiate "I'm not responsible" results from "I diff --git a/tkcon.tcl b/tkcon.tcl index 7dfcc82..c34a9b7 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -705,7 +705,10 @@ proc ::tkcon::InitUI {title} { if {!$PRIV(WWW)} { wm title $root "tkcon $PRIV(version) $title" - if {$PRIV(showOnStartup)} { wm deiconify $root } + if {$PRIV(showOnStartup)} { + # this may throw an error if toplevel is embedded + catch {wm deiconify $root} + } } if {$PRIV(showOnStartup)} { focus -force $PRIV(console) } if {$OPT(gc-delay)} { -- 2.23.0