[Gambas-user] Creating Actions at runtime
Me
adamnt42 at gmail.com
Thu Sep 27 05:33:22 CEST 2018
On Fri, 21 Sep 2018 09:49:27 +0200
Gianluigi <bagonergi at gmail.com> wrote:
> Thanks Gianluigi. (I missed your post somehow the other day).
Well, it looks like what I wanted to do is not possible.
Some observations. (Mainly for my own interest as I will probably need to refer to this later in time.)
1) The Action.Configure() function uses the form defined in the gb.gui.mdi component.
Which is interesting! At least I was able to redefine the size of the pop-up to something more
reasonable.
1a) That shortcut editor only looks at the files in the .action sub-directory (or the executable archive
version thereof) of the active project to build its' list of "editable" actions. In addition, it will only add
actions that have a defined shortcut already.
This then, means that all user configurable shortcuts must be defined statically in the project design as
that is the only way they will get into the .action files.
2) Really bewildering! Creating a menu item at runtime, works. Further, the Action and Shortcut defined
in the code operate as expected. I can evidence this by creating a couple of menus in the code, one of
which hides or shows the other using the Action defined for the other. However, these items do not
appear in the Action,List array?
I thought I might be able to use the Action.List array and build my own shortcut editor. No joy.
--
Me <adamnt42 at gmail.com>
More information about the User
mailing list