Dear Friend,
I have a JQButton and ActionList with one action named "actEdit". This action have OnExecute routine to do something.
Then I assign JQButton.Action to actEdit. Now when I click the button OnExecute event was fired. Now I want to reach the component that run this action. The code something like this:
procedure actEditExecute(Sender: TObject);
var
AC: TComponent;
begin
AC:= TAction(Sender).ActionComponent;
WebApplication.ShowMessage(AC.ClassName); <-- AV raise here
end;
I debug it and found that Sender parameter is TIWCGJQButtonOptions, so for reaching to component instance you must use TIWCGJQButtonOptions(Sender).Button;
In the VCL when we do same with the TBitBtn component or else, TAction(Sender).ActionComponent is button or else.
I think it is a bug of your component. If anyone wants to write cross code (win and web) with actions, one code will not work.
When we write this code at Action.OnExecute then TAction(Sender).ActionComponent must the component that run the action(Action assigned to it).
Your Sincerely
Mehdy Karimpour