Sender as TfrxMemoView - doesn't work in script
Hello,
My problem is that this works...
procedure ProfileOnBeforePrint(Sender: TfrxComponent);
begin
Memo3.Text := 'something';
end;
But this doesn't:
procedure ProfileOnBeforePrint(Sender: TfrxComponent);
begin
(Sender as TfrxMemoView).Text:= 'something';
end;
The error is "; expected"
Why can't I refer as (Sender as TfrxMemoView) in the script like in Delphi? What is the Sender parameter for if I can't use it?
My problem is that this works...
procedure ProfileOnBeforePrint(Sender: TfrxComponent);
begin
Memo3.Text := 'something';
end;
But this doesn't:
procedure ProfileOnBeforePrint(Sender: TfrxComponent);
begin
(Sender as TfrxMemoView).Text:= 'something';
end;
The error is "; expected"
Why can't I refer as (Sender as TfrxMemoView) in the script like in Delphi? What is the Sender parameter for if I can't use it?
Comments
TfrxMemoView(Sender).Text:= 'something';
Thank you, it works perfectly