[fpc-pascal] How to detect an any property change in object?

Krzysztof dibo20 at wp.pl
Wed Feb 8 13:16:06 CET 2012


Hi,

I have some class with propertys:

type TMyClass = class
  private
    FProperty1: Boolean;
    FProperty2: String;
    procedure SetProperty2(AValue: String);
    procedure ClassChanged;
  public
    property Property1: Boolean read FProperty1 write FProperty;
    property Property2: String read FProperty2 write SetProperty2;
  end;

I want call ClassChanged on each property change. I could create
SetXXX function for all propertys and there call this method, but
exists any "low level" hack to detect "write" operation on custom
property?

Regards.



More information about the fpc-pascal mailing list