Callback order for sub-menu events

I've noticed unwanted behavior when using submenus: the EVT_MENU_CLOSE
for a submenu triggers after the EVT_MENU_HIGHLIGHT for whatever we've
moved
the mouse to.

This means that if we're using a status bar, the menu help text will
appear (due to
the highlight callback) then immediately be cleared (due to the close
callback).

Minimal demo here: https://gist.github.com/2429815

Is there a recommended way to handle this problem?

(tested with wxpython 2.9.3.1 osx-cocoa (classic), Mac OS 10.6.8)

What exactly is the problem? Menu help text is only supposed to be displayed while the menu item is highlighted. What were you expecting it to do?

···

On 4/20/12 8:46 AM, mkeeter wrote:

I've noticed unwanted behavior when using submenus: the EVT_MENU_CLOSE
for a submenu triggers after the EVT_MENU_HIGHLIGHT for whatever we've
moved
the mouse to.

This means that if we're using a status bar, the menu help text will
appear (due to
the highlight callback) then immediately be cleared (due to the close
callback).

Minimal demo here: gist:2429815 · GitHub

Is there a recommended way to handle this problem?

(tested with wxpython 2.9.3.1 osx-cocoa (classic), Mac OS 10.6.8)

--
Robin Dunn
Software Craftsman

The problem is that if you move your mouse from the submenu back
to the menu item, the help text for that menu item won't be displayed.

More precisely, it will be displayed then immediately cleared when the
submenu's close callback executes, since this occurs after the menu
item's highlight callback.

Thanks,
Matt

···

On Apr 20, 2:27 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 4/20/12 8:46 AM, mkeeter wrote:

> I've noticed unwanted behavior when using submenus: the EVT_MENU_CLOSE
> for a submenu triggers after the EVT_MENU_HIGHLIGHT for whatever we've
> moved
> the mouse to.

> This means that if we're using a status bar, the menu help text will
> appear (due to
> the highlight callback) then immediately be cleared (due to the close
> callback).

> Minimal demo here:gist:2429815 · GitHub

> Is there a recommended way to handle this problem?

> (tested with wxpython 2.9.3.1 osx-cocoa (classic), Mac OS 10.6.8)

What exactly is the problem? Menu help text is only supposed to be
displayed while the menu item is highlighted. What were you expecting
it to do?

--
Robin Dunn
Software Craftsmanhttp://wxPython.org