[fpc-devel] Recent added support for Observer pattern in FCL

Graeme Geldenhuys graeme at geldenhuys.co.uk
Tue Aug 28 09:58:45 CEST 2012

On 28/08/12 08:50, michael.vancanneyt at wisa.be wrote:
> The first:
> Procedure TmyObject.SomethingChanged;
> Var
> Rec : TMyOperationInfo; // Contains custom information about your
> operation.
> begin
> Rec.XYZ:=MoreInfo; // Set up as needed.
> FPONotifyObservers(Self,ooCustom, at Rec);
> end;

Correct, and this is how I use it in tiOPF too — which has a similar 
observer implementation.

> It does not need one. The sender has changed, not an item in a list.
> The 'Item'-s are for when sender is a list, and an item is added to the
> list.

Ah yes, I understand your thinking now. Scrap my earlier comment on this 
point. :)

   - Graeme -

More information about the fpc-devel mailing list