Print Page | Close Window

Call a host command and several forms in a plug-in

Printed From: TMS Software
Category: VCL Components
Forum Name: VCL Plugin
Forum Discription:
Printed Date: 18 Nov 2019 at 1:13pm

Topic: Call a host command and several forms in a plug-in
Posted By: Rydmark Johan
Subject: Call a host command and several forms in a plug-in
Date Posted: 07 Jan 2015 at 9:57am

I'm finally trying to get going with the plug-in system and have two questions...

Can the plug-in call a host command? What I would like to do is to call several functions in the host to create the menu system when loaded. As I will use the TAdvToolBarPager, I need to create a page and several tool-bars with commands. I guess a inherited components is a way to go, so I could add page and toolbar settings in there? Any thoughts on how this is best done?

Secondly, can the plug-in hold several forms? Mostly I need a main form for the module, a setup form and some forms for dialogues and so on in each plug-in.

A nice, more complex, demo project would have been nice to have in the plugin package to get started, especially how to properly use it with other TMS components like the TAdvToolBarPager.

Any help or ides is very much appreciated! Or if I'm just trying to do it the wrong way ;-)


Posted By: Bruno Fierens
Date Posted: 08 Jan 2015 at 2:53am
In demo 4, it is shown how an ICustomAppServices interface is created (that the plugin can use to call host service) and a custom ICustomPluginInfo interface that the host can use to call a plugin service.
With these two custom interfaces, you can add bidirectional customization for the plugin framework.
A plugin can hold multiple forms. Not sure how / when you want to invoke these forms from the host, but there shouldn't be a limitation to add multiple forms.

Posted By: Rydmark Johan
Date Posted: 08 Jan 2015 at 8:28am
I missed that sample! That should make it fairly easy to populate a TAdvToolBarPager menu from the plug-in.



Print Page | Close Window