Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-12

Property alias

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Krzysztof

Hi,

Interfaces can have aliases for functions:

    Function MyOtherFunction : Integer;
    Function IMyInterface.MyFunc = MyOtherFunction;

Can normal object have aliases for properties? For example, TControl.Caption. I would like to publish this property in my descendant as "MyExtraText". Is this possible?

Regards

Reply by email

Unknown author
to Krzysztof
Krzysztof wrote 10 lines
Hi, Interfaces can have aliases for functions: Function MyOtherFunction : Integer; Function IMyInterface.MyFunc = MyOtherFunction; Can normal object have aliases for properties? For example, TControl.Caption. I would like to publish this property in my descendant as "MyExtraText". Is this possible?

Currently not.

Michael.

Reply by email

Howard Page-Clark
to Krzysztof: Interfaces can have aliases for functions: Function MyOtherFunction : Integer; Function…
Krzysztof wrote 10 lines
Hi, Interfaces can have aliases for functions: Function MyOtherFunction : Integer; Function IMyInterface.MyFunc = MyOtherFunction; Can normal object have aliases for properties? For example, TControl.Caption. I would like to publish this property in my descendant as "MyExtraText". Is this possible?

You can, of course, define a MyExtraText property with a setter and getter that refer to an existing property (or data field if it is accessible).

Howard

Reply by email

Krzysztof
to Howard Page-Clark

Thanks

2012/12/7 Howard Page-Clark

Show quoted text 25 lines
On 07/12/12 2:50, Krzysztof wrote: > Hi, > > Interfaces can have aliases for functions: > > Function MyOtherFunction : Integer; > Function IMyInterface.MyFunc = MyOtherFunction; > > Can normal object have aliases for properties? For example, > TControl.Caption. I would like to publish this property in my descendant > as "MyExtraText". Is this possible? > You can, of course, define a MyExtraText property with a setter and getter that refer to an existing property (or data field if it is accessible). Howard ______________________________**_________________ fpc-pascal maillist - http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal>

Reply by email