Re: [orca-list] orca 3.11 and java applications



Hey José.

I do not know if this is the best implementation, but it seems to work.

Criticism, suggestions, corrections and etc. are very welcome.

Thanks very much for doing this. I was curious about this and the
subsequent issues related to menu items, so I managed to get a working,
accessible Java Swing environment going. Holy cow, menu-related stuff is
broken in that toolkit. As a result, I redid the existing menu related
code in the Java toolkit script myself. In particular:

1. Contrary to what I suggested before, the current situation does
   warrant having the Java toolkit script override the default
   skipObjectEvent(). Events for menus and menu items are constantly
   getting stomped on (aka skipped) by newer, bogus events. It will
   be more performant to never skip menu-related events from Java than
   it will be to try to work out what's going on from the bogus events.

2. No matter how broken a menu-related event is (wrong event type,
   wrong state, etc.), if it claims to be the current item, just
   believe it and hope it's not lying. This approach seems to work.
   If you find cases where it doesn't, please let me know.

3. Removed the old hack related to the popup menu. Funny thing:
   The one case that hack claims to handle, it doesn't actually handle.
   When I press Shift+F10 in the SwingSet2 demo, that old hack goes
   digging through the entire descendant tree looking for a popup
   menu and doesn't find one. That is a very expensive check and
   gets called often enough because the root pane keeps saying it
   has focus. That it repeatedly fails to find anything just means
   we're spinning our wheels for nothing. Item 2 above will cause
   us to present the menu and its items when they claim to be active.
   In the case of the initial Shift+F10 popup, we don't seem to have
   any events we can even use to hack: Can't find the popup menu,
   it doesn't emit an event, and when it pops up no item is selected
   which would cause an event. So sadly we just present the root pane.
   But as soon as you arrow, we now present those popup menu items.

Take care.
--joanie


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]