* tkcon.tcl (::tkcon::InitUI): catch deiconify to prevent error
authorJeff Hobbs <hobbs@users.sourceforge.net>
Thu, 27 Dec 2012 22:22:49 +0000 (22:22 +0000)
committerJeff Hobbs <hobbs@users.sourceforge.net>
Thu, 27 Dec 2012 22:22:49 +0000 (22:22 +0000)
when embedding. [Bug #44]

ChangeLog
tkcon.tcl

index be79a25ffd1ef773d93a0ff2df88779188eb41c0..e548f4e1004ef70778bb4e9579ffa421f1cd0e98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-12-27  Jeff Hobbs  <jeffh@ActiveState.com>
 
+       * 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
index 7dfcc8299d7bf94ed3f6c983ca88ca45600fc4ad..c34a9b7749583aa64a46aae1aec8719b76049c2d 100755 (executable)
--- 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)} {