|
2016-06-28
| ||
| 21:28 | [ce92c79bc6] Improve the 'configure' method of the internal megawidget framework. Thanks to Schelte Bron for pointing out the problems with it. check-in: fc814ed70d user: dkf tags: trunk | |
| 21:27 | • Closed ticket [ce92c79bc6]: Megawidget framework improvements plus 8 other changes artifact: b0720ba2f4 user: dkf | |
| 21:25 | [ce92c79bc6] Improve the 'configure' method of the internal megawidget framework. Thanks to Schelte Bron for pointing out the problems with it. check-in: e1099ee9fb user: dkf tags: core-8-6-branch | |
| 20:00 | • Ticket [ce92c79bc6] Megawidget framework improvements status still Open with 5 other changes artifact: d17e748e43 user: dkf | |
| 19:40 | • Ticket [ce92c79bc6]: 4 changes artifact: b0bc4d1296 user: dkf | |
|
2016-06-27
| ||
| 11:39 | • Add attachment megawidget.patch to ticket [ce92c79bc6] artifact: a1fa3de1b7 user: sbron | |
| 11:38 | • New ticket [ce92c79bc6] Megawidget framework improvements. artifact: b3a6ba8125 user: sbron | |
| Ticket UUID: | ce92c79bc6a71f0456c4069ad6022cb95a8fc7cc | |||
| Title: | Megawidget framework improvements | |||
| Type: | Patch | Version: | 8.6.5 | |
| Submitter: | sbron | Created on: | 2016-06-27 11:38:22 | |
| Subsystem: | 28. Utility Functions | Assigned To: | dkf | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2016-06-28 21:27:42 | |
| Resolution: | Accepted | Closed By: | dkf | |
| Closed on: | 2016-06-28 21:27:42 | |||
| Description: |
The current megawidget framework (library/megawidget.tcl) has a few minor issues: The framework defines a configure method that uses tclParseConfigSpec, which is incompatible with the normal operation of the configure subcommand of existing widgets. tclParseConfigSpec doesn't accept only a single argument. When called with an even number of arguments (including 0), it resets all options that are not specified to their defaults. The use of tclParseConfigSpec really only makes sense when the widget is first created. The configure method should be a bit more sophisticated. There is no straight-forward way for a user of the megawidget framework to redefine the configure method due to its use from the constructor, so also the constructor would have to be replaced. The constructor makes the top widget command available as "theFrame". But the top widget doesn't always have to be a frame, which may make referring to it as "theFrame" a bit confusing. The attached patch moves the tclParseConfigSpec call to the constructor and provides a completely new configure method. This new method still doesn't accept unique prefixes of option names, but requires the full names. If this would be desirable, it can be added without too much difficulty. | |||
| User Comments: |
dkf added on 2016-06-28 21:27:42:
I've worked on the patch a bit more, trying to make the use of dkf added on 2016-06-28 20:00:20: Note that this code is not yet part of Tcl's public API, so even changes that touch what clients of the code are permitted. It was never the intention to make configuration not work. I just apparently never did it. dkf added on 2016-06-28 19:40:30: This was discussed at EuroTcl 2016. | |||
Attachments:
- megawidget.patch [download] added by sbron on 2016-06-27 11:39:21. [details]