* tkcon.tcl (tkcon show): catch deiconify as it will throw an
authorJeff Hobbs <hobbs@users.sourceforge.net>
Wed, 23 Jan 2013 01:19:51 +0000 (01:19 +0000)
committerJeff Hobbs <hobbs@users.sourceforge.net>
Wed, 23 Jan 2013 01:19:51 +0000 (01:19 +0000)
error if tkcon is embedded.

ChangeLog
tkcon.tcl

index fae07c94ab80069a8f22e16eac99659fde06497c..e22c844294527ad9bd6d23e7a91d992a93aa27bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-22  Jeff Hobbs  <jeffh@ActiveState.com>
+
+       * tkcon.tcl (tkcon show): catch deiconify as it will throw an
+       error if tkcon is embedded.
+
 2012-12-27  Jeff Hobbs  <jeffh@ActiveState.com>
 
        * tkcon.tcl (edit): add support for ::tkcon::OPT(tabspace) to
index c859a5423ebb8c49a8e9f792ff4ebf2efa4b9ab6..ee6a6c1e17578f2815570e6d283862c1f46f2ab4 100755 (executable)
--- 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* {