Tk Library Source Code

Artifact [9c9e2d5495]
Login

Artifact 9c9e2d54959f4f7aaa13c78be628409588c28bc3de1cf0b1878607f2a15a916f:

Attachment "dateentry-tcl84.patch" to ticket [2bcb3b11e7] added by ralfixx 2021-11-18 11:07:15. (unpublished)
--- tklib/modules/widget/dateentry.tcl~
+++ tklib/modules/widget/dateentry.tcl 
@@ -131,7 +131,6 @@
     component dropbox
     component calendar
 
-    variable waitVar
     variable formattedDate
     variable rawDate
     variable startOnMonday 1
@@ -205,9 +204,11 @@
     }
 
     method post { args } {
+	if {[lsearch -exact [$self state] "disabled"] >= 0} {
+	    return
+	}
 	# XXX should we reset date on each display?
 	if {![winfo exists $dropbox]} { $self MakeCalendar }
-	set waitVar 0
 
 	foreach {x y} [$self PostPosition] { break }
 	wm geometry $dropbox "+$x+$y"
@@ -219,10 +220,6 @@
 	}
 	focus -force $calendar
 	return
-
-	tkwait variable [myvar waitVar]
-
-	$self unpost
     }
 
     method unpost {args} {
@@ -274,11 +271,10 @@
     method DateChosen { args } {
 	upvar 0 $options(-textvariable) date
 
-        set waitVar 1
 	set date $formattedDate
 	set rawDate [clock scan $formattedDate -format $options(-dateformat)]
 	if { $options(-command) ne "" } {
-	    uplevel \#0 $options(-command) $formattedDate $rawDate
+	    uplevel \#0 $options(-command) [list $formattedDate] [list $rawDate]
 	}
         $self unpost