Hydra 6.5.0.1295 and TActionList

Hi,

I’m testing to convert an application written in Delphi 7 to Delphi 11.x. Managing unpackaged plugins works great! I am trying the use of Actions in plugins and I see that they are handled correctly except the execution of the OnUpdate event. Only when I press the button with the associated action the OnUpdate event is invoked.

In the form plugin the property PluginActions is correctly setted

Is this correct behavior?

Hi,

Can you create a simple testcase the reproduces this issue, pls?
it will allow to investigate and fix this issue more faster

Hi EvgenyK

yes!.

The first problem is that I cannot select the TAction in Object Inspector

I need to set action name manually.

I attach the sample

Thank you very much and best regards

Simple Visual.zip (39.5 KB)

Hi,

this is solved very simple:
set VCL framework for plugin. for this open VisualModule.dproj in any text editor (e.g. Notepad) and change

<FrameworkType>None</FrameworkType>

to

<FrameworkType>VCL</FrameworkType>

after this, you can set action in IDE

1 Like

Hi Evgenyk

any news for this problem:

“I’m testing to convert an application written in Delphi 7 to Delphi 11.x. Managing unpackaged plugins works great! I am trying the use of Actions in plugins and I see that they are handled correctly except the execution of the OnUpdate event. Only when I press the button with the associated action the OnUpdate event is invoked.”

Thank you

Best Regards

Hi,

You are using mode without runtime packages so Hydra/VCL interfaces don’t work as expected because objects in host and plugin are incompatible so you should trigger OnUpdate manually via custom interface like

  IActionUpdate = interface
  ['{71217C01-CA4B-468F-9C79-4DA5140DC9E7}']
    procedure UpdateActions;
  end;

Pls check sample for more details:
testcase.zip (31.7 KB)

1 Like

Great! Thank you very much Evgenyk!!!

1 Like