Executing an objects' procedure/function using the run-time information...
Posted on 2001-09-04
The problem is I need to access the 'SetRange' and 'CancelRange' procedures of a TTable (amongst other things)... * BUT * it not only needs to work for a TTable but also a TffTable (FlashFiler) and a TADSTable (Advantage) [and possibly any other Table type that has the procedures declared].
So I am using the table as a TDataSet.
As the procedures aren't declared until the TTable class I can't type cast back and I can't typecast forward as the unit cannot not be specific to any type of Table, ie. not using conditional compilations or Uses or "If oTable is TffTable then"...etc
Example Code fragment:
procedure SetRangeOnTable(oTable: TDataSet);
// set IndexName via run-time property information
// Execute SetRange() via run-time information