From: SourceForge.net <no...@so...> - 2005-05-01 03:20:56
|
Bugs item #1192095, was opened at 2005-04-29 10:28 Message generated for change (Comment added) made by wildcard_25 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1192095&group_id=12997 Category: 10. Generic Menus Group: development: 8.5a3 Status: Open Resolution: None Priority: 5 Submitted By: Daniel South (wildcard_25) Assigned to: Todd Helfter (tmh) Summary: Toplevel menus return incorrect active index Initial Comment: Tk: v8.5a3 HEAD, v8.4.9 HEAD OS: WinXPsp2, Debian Linux-woody-testing When the attached script is run some unusual behaviour is observable. First on Windows with 8.5 & 8.4 Mouse over the menus without opening them - no output Now open the 'help' menu, active index is correct (if zero based like cascade menus) but returned label says you are in the 'edit' menu. Moving to the 'edit' menu will produce similar results. Moving to the 'file' menu will cause a crash. Also noticable is that the binding is called twice. Moving onto Linux and 8.5 and 8.4 Everything works as expected. Mousing over menu without opening them triggers binding. Labels are returned correctly. Indices are returned and are one based unlike cascade menus which are zero based. Binding is also called twice. ---------------------------------------------------------------------- >Comment By: Daniel South (wildcard_25) Date: 2005-05-01 13:20 Message: Logged In: YES user_id=596509 Looks like tk expects a zero based response, but zero refers to the tearoff menu entry, whether its shown or not. The windows menubar doesn't have a hidden tearoff entry and therefore returns 0 instead of 1 for the file menu in the example. Patch bumps the index number up by one if it is a menubar. Patch for Tk8.4 also includes the fix in Tk8.5 for index being greater than number of entries, as I use the variable it creates. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1192095&group_id=12997 |