Jump to content

Search the Community

Showing results for tags 'refactoring'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 2 results

  1. Greetings Dear Delphians, Say we have 20 Forms in an App. We use these 6 lines to create 20 Forms at different places. Form1 := TForm1.Create; try Form1.ShowModal; finally Form1.Free; end; When refactoring we can see this is a lot of code duplication and we should encapsulate form creation in a procedure like this. procedure ShowForm ( ThisForm: TCustomForm ) ; begin ThisForm := TCustomForm(ThisFormClass.Create);//?? How to Get Form Class try ThisForm.ShowModal; finally ThisForm.Free; end; end; I only have problem in first line. how to get ThisForm parent class to call it. Is it even possible? If yes then how? What about FMX? Any help or pointer is appreciated. Thanks and stay blessed
  2. Please forgive the question if it's seems obvious. I have always Implemented an interface in a new class the hard way in Delphi 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 Delphi 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 only possible through a third party IDE add-in like MMX? 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.
×