Sign in Join
FPDoc Onlineexperiment

TObservedHook.FPOAttachObserver procedure

Member of TObservedHookpublicIn unit fpObserver

Attaches an observer implementing IFPObserver interface

Declaration

pascal
procedure FPOAttachObserver(AObserver: TObject)

Arguments

AObserver

Observer object to attach

Description

The FPOAttachObserver method adds an observer to the notification list. The observer object must implement the IFPObserver interface or an exception will be raised.

Once attached, the observer will receive notifications about all operations performed on the observed object, including changes, item additions, deletions, and custom notifications.

Errors

The same observer can only be attached once; attempting to attach it multiple times will result in an EObserver Eexception.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.