Menu accelerators problem

ron barber runrevron at gmail.com
Thu Feb 21 04:18:03 EST 2008


Greetings,
Background: A couple of months ago I asked about handling multiple menubars
in a multi lingual application. I received several helpful replies and after
finding time to implement the suggestions, saved lots of space and greatly
simplified the menu handling procedure in my app. It is much easier to
maintain one main menupick handler than 10 or more of the same thing.

Problem: However, now I am losing the menuaccelators. For example: the
Japanese menuitem "Find" is the "Edit" menu's 5th item, the same as the
English and Korean, the only difference is the spelling. The selectedline of
the target is captured in the main (and now only) menupick handler. This
works well. When the accelerator is used however, the selectedline returns
1, not 5. So all accelerators return 1 for a given menu.

My Solution: So far, I have chosen to get the name or label of the target
and with this I can tell which menuitem was chosen. This seems to defeat
part of the advantage of the advice I was given to ignore the specific names
of the item and take advantage of the fact that they occupy the same line in
the menu. Is there a way to get the accelerator key? Is there a better way
to respond to the accelerator than what I am doing?

Help?

Thanks
Ron



More information about the use-livecode mailing list