Is there any built in or external tool (wizard) to easily add class member (published field) with getters / setters?
adding each field requires me to write quite lot of code. Let's assume I need to add Foo: Bar;
property.
I'll need to write
FFoo: TBar;
procedure SetFoo(const AValue: TBar);
function GetFoo: TBar;
...
property Foo: TBar read GetFoo write SetFoo
any tool to make it quick and easy?
Type:
property Foo: TBar read GetFoo write SetFoo;
or:
property Foo: TBar read FFoo write SetFoo;
Then press CTRL-SHIFT-C
EDIT: The latter (setter and field combo) can be done even faster by writing only the following, followed by CTRL-SHIFT-C:
property Foo: TBar;
This shortcut also works if you write a method in your class and you wish to create the matching implementation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With