Ticket UUID: | 2bcb3b11e753a5599df42257c6cf7d3ac5e66934 | |||
Title: | tklib::widget::dateentry -command bug, obey state "disabled" | |||
Type: | Bug | Version: | dateentry 0.96 | |
Submitter: | ralfixx | Created on: | 2021-11-17 17:55:18 | |
Subsystem: | widget | Assigned To: | aku | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Closed | Last Modified: | 2022-05-10 11:58:57 | |
Resolution: | Accepted | Closed By: | aku | |
Closed on: | 2022-05-10 11:58:57 | |||
Description: |
1) dateentry calls its -command via [uplevel], adding the formatted and raw date as arguments. Since uplevel concatenates the arguments, any spaces in the formatted date change the number of arguments passed to the called function, which cannot be intentional. The tklib::widget::calender (which is used by dateentry) in contrast properly protects the arguments by [list]. -dateformat {%d %m %Y} => -command called with four arguments: d m y raw -dateformat {%d-%m-%Y} => -command called with two arguments "d-m-y" raw 2) the dateentry can be set to state "disabled" and does indeed grey out the entry, but nevertheless opens the calendar when clicking on the dateentry. Related Ticket UUID: 3458170 3) there is unused code in dateentry.tcl which should be removed Proposed patches attached. | |||
User Comments: |
aku added on 2022-05-10 11:58:57:
Done with commit [5f960415f9]. Version bumped to 0.97. Thanks to [email protected] for the report, the patch, and patience. ralfixx added on 2021-11-18 11:06:19: Just realized that the patch uses "in" expression syntax which is not in tcl8.4, so better use lsearch to check for disabled state. => dateentry-tcl84.patch |