Hi Ross
I can think of only one instance where the second form would be
unavoidable. That is where a unit containing a parent class refers to
one of its subclasses. In other words, the class design is screwed, but
the second form sidesteps the compiler error regarding circular referencing.
I have actually seen a situation where a 3rd party library was modified
so that it referenced a class in the main/calling application. Insane!
If you're looking at something similar, I would suggest you switch to
the first form and fix the crappy design.
Todd.
Just as a matter of curiosity really, anyone know if there is any
difference in speed for these 2 operations.
if abc is TMyObject then
and
if abc.Classname = 'TMyObject' then
?
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe