<div dir="ltr">Hello,<div><br></div><div>I'm trying to add new features in a third generic type. Please see this simulation below:</div><div><br></div><div><div> { TThirdGeneric }</div><div><div><br></div><div> generic TThirdGeneric<T> = class</div>
<div> private</div><div> FFoo: T;</div><div> public</div><div> procedure Post;</div><div> property Foo: T read FFoo;</div><div> end;</div></div><div><br></div><div> { TMyGeneric }</div><div><br></div><div> generic TMyGeneric<T> = class(TThirdGeneric)</div>
<div> public</div><div> procedure ConfigureFoo;</div><div> end;</div><div><br></div><div><div> { TMyClass }</div><div><br></div><div> TMyClass = class(TMyGeneric)</div><div> public</div><div> procedure Post;</div>
<div> end;</div></div><div><br></div><div>...</div><div><br></div><div><div>{ TMyGeneric }</div><div><br></div><div>procedure TMyGeneric.ConfigureFoo;</div><div>begin</div><div> ... pre configure Foo ...</div><div>end;</div>
<div><br></div><div>{ TMyClass }</div><div><br></div><div>procedure TMyClass.Post;</div><div>begin</div><div> Write(Foo.AProperty); // using pre configured Foo</div><div>end;</div></div><div><br></div><div>Just trying to understand the generics concept correctly. :S<br>
</div><div><br></div>-- <br>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>