Ticket UUID: | 2820851 | |||
Title: | fix dynamichelp issues | |||
Type: | Patch | Version: | None | |
Submitter: | danckaert | Created on: | 2009-07-13 16:24:09 | |
Subsystem: | bwidget | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2009-07-14 16:23:14 | |
Resolution: | Accepted | Closed By: | oehhar | |
Closed on: | 2009-07-14 09:23:14 | |||
Description: |
This patch fixes some issues with dynamic help. One of the issues is that help for a menu sometimes stays visible when the menu is unmapped (on Unix). This is an example script: pack [frame .f -width 200 -height 200] pack [label .l -textvariable statusvar] . configure -menu [menu .m -tearoff 0] .m add cascade -label "File" -menu [menu .m.f -tearoff 0] .m.f add command -label "New" DynamicHelp::add .m.f -type menu -variable statusvar DynamicHelp::add .m.f -type menu -index 0 -text "help for New" Now click on "File", and then move the mouse cursor upwards (out of the window), and click again. The menu is unmapped, but on Unix, the help stays visible. The patch should fix this. Other issues addressed in this patch are: - Make "-helpcmd" available also when dynamichelp is included in another widget. - Make sure that -helpcmd is always called at global scope (with uplevel #0). - Sometimes a <Leave> event may be called twice. Protect against this. - When _unset_help is called, the _top widget should only be destroyed when it is a balloon. | |||
User Comments: |
oehhar added on 2009-07-14 16:23:14:
Thank you, Koen ! Patch integrated. Please check current cvs (this evening) if everything works for you. danckaert added on 2009-07-13 23:27:02: I noticed that the latest CVS version already contains a protection against the <Leave> event being called twice, namely by catching {unset _saved}. But I think it is better to use an appropriate condition instead of simply using [catch]. danckaert added on 2009-07-13 23:24:10: File Added - 334902: dynhelp.patch |
Attachments:
- dynhelp.patch [download] added by danckaert on 2009-07-13 23:24:10. [details]