Recent

Author Topic: Is there a way to get the IDE to generate interface methods  (Read 294 times)

Xor-el

  • Sr. Member
  • ****
  • Posts: 374
Is there a way to get the IDE to generate interface methods
« on: September 24, 2019, 08:17:30 am »
Please forgive the question if it's seems obvious.  I have always Implemented an interface in a new class the hard way in Lazarus by copying the interface members from the interface into the class and using class completion to generate the methods.  Is there a way to do so in the Lazarus IDE without such a manual brute force technique?  I don't see anything in the Refactor menu and invoking Class Completion on a class with an unimplemented interface does nothing.  Is this not possible?

 

I would think that in the age of interface based development, making it easy to define and implement interfaces would be a well supported use case within the IDE, so I am assuming I just don't know of it. It's a snap in Visual Studio.

Xor-el

  • Sr. Member
  • ****
  • Posts: 374
Re: Is there a way to get the IDE to generate interface methods
« Reply #1 on: September 25, 2019, 01:01:50 am »
Any help please?  :(

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5705
    • wiki
Re: Is there a way to get the IDE to generate interface methods
« Reply #2 on: September 25, 2019, 01:42:14 am »
I have no idea, but I did a quick test, and "refactor" > "Abstract methods" seems to list them.