Re: TVirtualMethodInterceptor cannot be used for AfterConstruction

skybuck2000 <[email protected]> Sun, 30 Jan 2022 16:17:14 -0800 (PST)
Newsgroups alt.comp.lang.borland-delphi
Message-ID <[email protected]>
Delphi itself has a TVirtualClass but it was ment for interfaces or something.

But there is another library on the internet which might be a bit better and maybe it can also work with AfterConstruction which would be cool:

https://bitbucket.org/sglienke/spring4d/src/master/Source/Base/Spring.VirtualClass.pas

Maybe this can be of some use.

Alternative would be to use class helpers to override/reimplement constructors, for Tobject and all other objects/Streams that override their constructors... however the downside is such a class helper unit must be on the uses clausule everywhere which is a pain in the ass but it would be quite a fast solution... hmmm... still interested in this rtti solution though =D

Also I need access to the stream contents... for some it might be easier like TCustomStream for others it might be hard... hmmm. These stream classes may have been a bad idea for Delphi, turns programs too much into binary streams everywhere... hard to debug.

Bye,
  Skybuck.