On Thu, Feb 23, 2012 at 10:57, Mattias Gaertner
<nc-gaert...@netcologne.de> wrote:
> On Thu, 23 Feb 2012 09:32:14 +0200
> ik <ido...@gmail.com> wrote:
>
>> On Thu, Feb 23, 2012 at 00:45, Mattias Gaertner
>> <nc-gaert...@netcologne.de> wrote:
>> > On Thu, 23 Feb 2012 00:26:32 +0200
>> > ik <ido...@gmail.com> wrote:
>> >
>> >> On Thu, Feb 23, 2012 at 00:09, Mattias Gaertner
>> >> <nc-gaert...@netcologne.de> wrote:
>> >> > On Wed, 22 Feb 2012 23:57:12 +0200
>> >> > ik <ido...@gmail.com> wrote:
>> >> >
>> >> >> Hello,
>> >> >>
>> >> >> Is there a shortcut in Lazarus's editor for Adding all of the methods
>> >> >> that are added to an interface ?
>> >> >
>> >> > No. There is already a feature request.
>> >> >
>> >> >
>> >> >> Also, Is there a way to tell Lazarus to foreword the parent methods
>> >> >> and property for the child's declaration ?
>> >> >
>> >> > Can you give an example?
>> >>
>> >> TParent = class
>> >> private
>> >>   FBar : String;
>> >>   FBaz : integer;
>> >> public
>> >>   procedure Foo;
>> >>
>> >>   property Bar : String read FBar; write FBar;
>> >> published
>> >>   property Baz : Integer read FBaz write FBaz
>> >> end;
>> >>
>> >> TChild = class(TParent) // Let's say CTRL+SHIFT+C for example
>> >> public
>> >>    property Bar; //Foreword from CTRL+SHIFT+C for example
>> >> published
>> >>    property Baz; // ...
>> >> end;
>> >
>> > The above has no effect.
>> > What do you want to achieve?
>>
>> That rather constantly doing copy paste of original properties and
>> even methods to foreword to a new class, there will be a tool for
>> that.
>> With my Redis client, I have a basic class that contain such
>> properties, and few classes that inherits them, and require to have
>> the properties inside.
>> It would be nice, but not a real demand to have such support.
>>
>> The CTRL+SHIFT+C is the tool for the job imho, because it completes
>> code declarations, but as you discover, it does not do that at the
>> time.
>> I think that part of the interface inheritance feature that will or
>> might be designed, it should support also this.
>
> I still don't see the point.
> The properties have the same visibility, type, getters and setters.
> I could understand the demand for a tool doing the opposite: to clean up
> such duplicate properties.
> Or a tool to raise the visibility of inherited properties.

In my knowledge in Pascal, if the child does not pass the parent
properties, then they are not visible in the child.
For example in the RTTI you will not see the published property
because it was not foreword to the child.

>
> Mattias
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to