Tk Library Source Code

Artifact [61cee027eb]
Login

Artifact 61cee027eb44130ae186957a668150bd50eca0a5:

Attachment "tk_getString.unified.patch" to ticket [2829049fff] added by martinlemburg 2009-07-29 22:36:04.
--- C:/tcl/starpacks/lib/tklib0.5/getstring/Kopie von tk_getString.tcl	Thu Jan 22 05:00:46 2009
+++ C:/tcl/starpacks/lib/tklib0.5/getstring/tk_getString.tcl	Wed Jul 29 17:28:21 2009
@@ -41,6 +41,7 @@
     set grab [grab current .]
 
     toplevel $w -relief raised -class TkSDialog
+    wm withdraw $w
     wm title $w $options(-title)
     wm iconname $w $options(-title)
     wm protocol $w WM_DELETE_WINDOW {set ::getstring::result 0}
@@ -66,7 +67,10 @@
         $w.ok configure -state disabled 
     }
 
-    wm withdraw $w
+    if {[info exists result]} {
+        $w.entry insert end $result;
+    }
+
     update idletasks
     focus -force $w.entry
     if {[info exists options(-geometry)]} {