delphi-shortcut to implement interface method and abstract method from ancestor interface or class
I have example code like this
IExample=interface procedure Test; end; TBaseClass=class function Check:boolean;abstract; end; TExampleObject=class(TInterfacedObject,IExample) end; TAnotherObject=class(TBaseClass) end;
My question is, how I can implement interface method and abstract method from ancestor?
I use Visual Studio and C#, very simple to make implementation from abstract method and interface method, I just right click on my class, and Implement method.
Does RAD Studio XE2 have similiar tool or third party tool that have same function? because is annoying if I must write down all abstract and interface method manually
I suppose there are IDE plugins out there that offer the functionality you want.
I use this method every day:
Copy the methods from your interface to the public section of your class, set cursor on one of these methods and execute shortcut CTRL-SHIFT-C. Delphi will automagically create the functions/procedures in the implementation section for you!
This works for all classes...
Yeah, it would be nice if this worked for functions inherited through Interfaces too and it would be nice if it worked in Interfaces themselves for creating Getter / Setters for Interface Properties!
That said, I will log it with QC (if its not already) as its a good suggestion.
Update: Here you go :) - http://qc.embarcadero.com/wc/qcmain.aspx?d=121748