[Gambas-user] Another present!
Benoit Minisini
gambas at ...1...
Wed Dec 31 17:06:47 CET 2008
Hi,
After the gb.image.info component, here is a new present, for the new year:
`` Automatic shortcut configuration ''
Well, what's that?
As soon as you use the gb.form.mdi component, and that you define the Action
property of all menus / buttons accordingly, you just have to call the
Action.Configure() static method to get a dialog box that allows the user to
configure the application shortcuts.
Shortcuts are associated with action names, *without* the optional dot at the
beginning.
Reminder: action names beginning with a dot are local actions. See the wiki
page on the Action class for more details.
The IDE implements that, so that you can see it.
There are some caveats:
- Shortcuts work only if there is a menu entry associated with the action.
- Shortcut action names are not translated yet. A new function is needed in
Gambas for that.
- Shortcuts are initialized each time a form is opened. Not created. That
leads to useless work when your form is persistent.
- The list of actions is stored by the IDE in a folder named ".action" when a
form is saved to the disk. If you want to use Action.Configure() in an
already existing project, you must use the "Update all forms" menu entry in
the IDE to force the saving of all forms and generate all action files.
- Actions having the same name must have the same shortcut. Even if they are
local actions of different forms. This is not really a caveat, as this makes
things logical to the user.
All that is in Gambas 3, revision #1758.
Enjoy it, and report bugs as usual!
--
Benoit Minisini
More information about the User
mailing list