<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2018-04-23 14:02 GMT+02:00 LacaK <span dir="ltr"><<a href="mailto:lacak@zoznam.sk" target="_blank">lacak@zoznam.sk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Can you give small example for my use case ? I can not understand
from above mentioned examples.</p></div></blockquote><div>unit A;<br></div><div><div>type</div><div> TClassA = class</div><div> public</div><div> procedure Method1;</div><div> end;</div><div><br></div><div>unit B;</div><div>type</div><div> TClassAHelper1<T> = record </div><div> private</div><div> instance: T default; </div><div> public</div><div> procedure MethodB1;</div><div> procedure MethodB2;</div><div> end;</div><div><br></div><div>unit C;</div><div>type</div><div> TClassAHelper2<T> = record</div><div> private</div><div> instance: T default; </div><div> public</div><div> procedure MethodC1;</div><div> procedure MethodC2;</div><div> end;</div><div><br></div><div>and in program:</div><div><br></div><div>use A,B,C;</div><div>var instanceA: TClassAHelper1<TClassAHelper2<TClassA>>; // it can be composed in other way (more elegant for example as specialization in new type)</div><div>...</div><div>instanceA := TClassA.Create;</div><div>instanceA.Method1;</div><div>instanceA.MethodB1; // defined in unit B</div><div>instanceA.MethodC1; // defined in unit C</div></div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Best regards,<br>Maciej Izak</div></div></div>
</div></div>