[Lazarus] Controlling access to a method

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Wed Jan 30 12:18:08 CET 2013


Given a fragment of code like this:

type
   TDbConfigFrame = class(TFrame)
..
   public
     { public declarations }
     property DbInit: TDbConfigInit write fdbInit;
   end;

is there any way of enforcing a rule that DbInit can only be written by 
(for example) a descendant of TForm or TNotebook? Or only being writable 
by e.g. the OnCreate() method of certain designated form instances?


-- 
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 Lazarus mailing list