powered by CADENAS

Manual

Manual

1.1.6.10.1.5. Scripting with "Tweakmenu"

If you want to work with the new tweakmenu, you must register your action in the configs and in the PApplicationPool. You must only write the name of your action into the config. In your implementation you must only call registerAction via an instance from PApplicationPool. If you are coding with visual basic you must only call application.commands.add(“<name of action>”). After you have registered the action, you must only set other properties (e.g. icon path, …). The difference as compared to the "old" tweakmenu is that you don’t register menu or toolbar in the application. Tweakmenu makes the registerToolbar and registerMenu step via your entries in the menuvisibility-config and menustructure-config. Furthermore actions from the tweakmenu have an additional property autoRegistered. If you want to check whether an action exists, you must now check the value of that property. If the value is true, the action is registered by the tweakmenu. Otherwise the value is false and the action is registered by the application. The query whether an action exists, will always return true. The reason for this approach is that the tweakmenu registers all actions from menuvisibility-config like a prototype.