<p>Am 23.08.2017 16:58 schrieb "Marcos Douglas B. Santos" <<a href="mailto:md@delfire.net">md@delfire.net</a>>:<br>
><br>
> On Wed, Aug 23, 2017 at 11:00 AM, Anthony Walter <<a href="mailto:sysrpl@gmail.com">sysrpl@gmail.com</a>> wrote:<br>
> > Marcos, it doesn't work that way.<br>
> ><br>
> > Type helpers simply allow you to extend an existing type with new methods<br>
> > and/or properties. When you declare a type helper you extend all instances<br>
> > of said type given that:<br>
> ><br>
> > A) You 'use' the unit declaring the type helper in some other unit.<br>
> > B) No other unit you're using also defines a type helper for that same type.<br>
> > Only one type helper per type allowed.<br>
> ><br>
> > As to what they are useful for, consider the following:<br>
> ><br>
> > type<br>
> > // IShellLink is define by Microsoft<br>
> > IShellLinkHelper = record helper for IShellLink<br>
> > public<br>
> > procedure Save(const Target, Description, Link: string);<br>
> > end;<br>
><br>
> Anthony,<br>
><br>
> I understood. In fact, this is a great feature for whose work with<br>
> interfaces a lot.<br>
> We can have small interfaces but add some methods in just some places,<br>
> extending such interfaces.<br>
><br>
> Is this compatible with Delphi?</p>
<p>Interface helpers are only supported by FPC. But the other helpers (class, record, primitive types) are Delphi compatible.</p>
<p>Regards,<br>
Sven</p>