Am 23.08.2017 09:42 schrieb "Michael Van Canneyt" <mich...@freepascal.org>: > > > > On Tue, 22 Aug 2017, Anthony Walter wrote: > >> I just wanted to point out that revision 37023 Sven added type helper >> support for interfaces. >> >> Good job and thank you Sven! >> > > I'm having trouble understanding why this could be useful (apart from completeness). > The only thing I can come up with is adding properties: > > Property SomeProp : TSomeType Read GetSomeProp Write SetSomeProp; > > where GetSomeProp and SetSomeProp are part of the interface. > > Any other examples ?
It's the same as for the other kinds of helpers: being syntactic sugar. E.g. if I have an interface that has two methods that both return a string, but more often than not I need a combination of both results. The previous solution would have been a global function, now I can also do a helper with a method. Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal