<p>Am 19.10.2017 08:41 schrieb "Ryan Joseph" <<a href="mailto:ryan@thealchemistguild.com">ryan@thealchemistguild.com</a>>:<br>
><br>
><br>
><br>
> > On Oct 19, 2017, at 12:58 PM, Sven Barth via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> wrote:<br>
> ><br>
> > And your case for tkSString crashes, because that is a ShortString, not a AnsiString thus you need to cast to PShortString (best avoid "(P)String" in this context as this could lead to different results depending on the modeswitches). For the other string types you need to look at tkAString (AnsiString), tkWString (WideString) and tkUString (UnicodeString).<br>
> ><br>
><br>
> I know why it crashes at least. Thanks.</p>
<p>You're welcome. :)</p>
<p>> Btw why can’t type helpers be used here? I though you could add those and just call .Show() or something but I couldn’t figure that out.</p>
<p>You'd need a type helper for every type that you might specialize with and all those would need to be in scope during the declaration (not specialization!) of your generic as otherwise they wouldn't be found during specialization.</p>
<p>Regards,<br>
Sven</p>