| Description: |
The bugs below were found by the tests in branch tests-widgetPlus; each is covered by a test with the knownBug constraint (widgetPlus-10.14.*, 10.23.*, 10.24.*, 10.25.* and 10.26.2; the suffixes .1 to .5 are for entryPlus, spinboxPlus, ttkEntryPlus, ttkSpinboxPlus and ttkComboboxPlus). All of them occur for all five widgets, with Tk 8.6 and 9.1.
- Undo and redo replace the text with delete 0 end followed by insert, and both are validated. If -validatecommand rejects the intermediate empty text, the old text is not deleted, and undo produces a text that never existed. With -validate key -validatecommand {expr {[string length %P] > 0}}, after inserting "a" and then "b", edit undo gives "aab" instead of "a", and edit redo then gives "abaab" instead of "ab". (widgetPlus-10.14.*)
- .wp configure -textvariable {} pushes an empty text on the undo stack although the text does not change: after edit reset, edit canundo returns 1, edit undo has no visible effect, and edit redo clears the widget. (widgetPlus-10.23.*)
- The undo stack of a new widget starts with an empty text, and the initial value of the -textvariable is pushed on it as an edit: for set wpVar abc; widgetPlus::entryPlus .wp -textvariable wpVar, edit canundo and edit modified return 1, and the initial value can be "undone" to an empty text. (widgetPlus-10.24.*)
- When an existing widget with text is converted (e.g. entry .wp; .wp insert end hello; widgetPlus::entryPlus .wp), the undo stack starts with an empty text instead of the existing text, so after an edit the first undo empties the widget instead of restoring "hello". The same happens with the initial value of a spinbox: for widgetPlus::spinboxPlus .wp -from 1 -to 5, undo after .wp invoke buttonup gives an empty text instead of "1". (widgetPlus-10.25.*, 10.26.2)
|