[fpc-pascal] Overriding or reimplementing a property

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sat Mar 2 00:02:46 CET 2013


Given something like

implementation

var     DBConnectionNearby: TSQLConnection= nil;

..
case MainForm.NearbyKind of
   dbkFirebird: DBConnectionNearby := TIBConnection.Create(nil);
   dbkPostgres: DBConnectionNearby := TPQConnection.Create(nil);

is there an elegant way of overriding the Connected property to point to 
code that can e.g. check that all prerequisite libraries are available 
before trying to activate the object?

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list