[Lazarus] Ann: class code creation

Dmitry Boyarintsev skalogryz.lists at gmail.com
Tue Mar 8 02:39:00 CET 2016


On Mon, Mar 7, 2016 at 3:25 PM, Ondrej Pokorny <lazarus at kluug.net> wrote:

> I implemented "class code creation" in r51851. I was already tired of
> creating/copying object variables by hand. The idea is the same as with
> code creation (ctrl+shift+c), but the variable is created in one of the
> class section:
>
> procedure TClass.Test(y: integer);
> begin
>   x| := y;
> end;
>
> how about inline notation.
procedure TClass.Test(y: integer);
begin
  x pvt| := y;
end;

or

procedure TClass.Test(y: integer);
begin
  x private|:= y;
end;

hit ctrl+shift+x

type
  TClass = class
  private
    x: Integer;
    procedure Test(y: integer);
  end;

implementation

{ TClass }

procedure TClass.Test(y: integer);
begin
  x |:= y;
end;

Eventually people will know the dialog well, so selecting the needed item
in the dialog might be painful.
As well as adding more items to the dialog (by further IDE improvement)
will frustrate users.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160307/bcc1d060/attachment-0003.html>


More information about the Lazarus mailing list