-
Content Count
3 -
Joined
-
Last visited
Posts posted by ToniDelphi
-
-
The above given approach with Generics is really exciting and exactly that what I'm searching for. I tried to adjust that to me needs, however I'm stuck at the very beginning as I run into a compile error with the given syntax "E2003 undeclared identifier TxQuery".
Anybody knows how is the exact "class of" syntax in conjunction with Generics? Couldn't find anything in Delphi's docu.
type TxQuery<T: TDataSet> = class abstract private FiQuery: T; protected function GetSQL: TStrings; virtual; abstract; function GetDataSet: TDataSet; virtual; abstract; property iQuery: T read FiQuery write FiQuery; public procedure Execute; virtual; abstract; property SQL: TStrings read GetSQL; property DataSet: TDataSet read GetDataSet; end; TxQueryClass = class of TxQuery; --> compile error
A Curious Inheritance Problem... what pattern solves it?
in RTL and Delphi Object Pascal
Posted
...ah, I see! Thanks, that made my day !