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.
Script to test menus
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.
Patch for Tk v8.4
Patch for Tk v8.5