Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Class helper?

 Post Reply Post Reply
Alex Egorov View Drop Down

Joined: 04 May 2017
Posts: 64
Post Options Post Options   Quote Alex Egorov Quote  Post ReplyReply Direct Link To This Post Topic: Class helper?
    Posted: 09 Nov 2019 at 9:26am

Now I have several classes and have an exported unit with Entities.
But what about any class functions and procedures?

For example, I have TAcc class and I need to add methods
and many others in the future, but it is not part of database structure,
it is program code but to add this method I should add it using exporting script.

Maybe add Class Helpers to a different unit?
What can You recommend?
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support

Joined: 18 May 2010
Posts: 2754
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 11 Nov 2019 at 12:00am
I believe the only automated option would be using the customization script and adding those methods through it. If it's lot a code it can become cumbersome indeed. Or let the customization script add {$I} directives to include files and then you add code in those files. Or you use the customization script to add some macros and then you do some post processing in the file and replace those macros.

Unfortunately Delphi doesn't have a concept like partial classes from C# so it's hard to extend classes from another unit.
Class helpers are a possibility, yes, if all you need are methods and you do not need to add fields in the class, then it might work for you.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down