Page 1 of 1

How to override OnFSCommand

Posted: Fri Sep 21, 2007 1:51 pm
by Donato
I have created a new component based on yours with added functionalities common to all my applications. I am trying to override the OnFSCommand using the Delphi way:

procedure OnFSCommand(ASender: TObject;
const command, args: WideString); override;

I also tried:

procedure FSCommand(ASender: TObject;
const command, args: WideString); override;

in both cases I get the message:

method not found on base class. Could you help?

Thank you very much

Donato

Posted: Fri Sep 21, 2007 5:04 pm
by Softanics
Thank you for your question.

Yes, really TFlashPlayerControl doesn't have FSCommand method that can be overriden in a derived class. TFlashPlayerControl calls fscommand event directly, not using an intermediate method.

You can handle fscommand event in your derived class to recived fscommand notification. Is it suitable for you?

Thank you.

PS I see your question in the ticket system, but it seems that you've entered invalid e-mail...

Posted: Wed Oct 17, 2007 11:18 am
by Donato
hi Artem,

sorry to bother you I don't know how to handle fscommand event in my derived class to recived fscommand notification. Could you drop me some lines? I will really appreaciate

Regards

Donato

Posted: Wed Oct 17, 2007 12:40 pm
by Softanics
Donato wrote:sorry to bother you I don't know how to handle fscommand event in my derived class to recived fscommand notification. Could you drop me some lines? I will really appreaciate


Something like that:

Code: Select all


procedure TDerivedClass.InternalFSCommandHandler(ASender: TObject; const command: WideString; const args: WideString);
begin
 ...
end;

procedure TDerivedClass.SetFSCommandHanler;
begin
   OnFSCommand := InternalFSCommandHandler;
end;


I haven't tested that but it should work well.