System.Classes.TObservers.GetSingleCastObserver

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetSingleCastObserver(const ID: Integer): IInterface; virtual;

C++

virtual System::_di_IInterface __fastcall GetSingleCastObserver(const int ID);

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes TObservers

Description

GetSingleCastObserver returns the single cast observer that can notify one endpoint about an update at a time. Single cast observers are used when there is a bidirectional relationship, so it would not make sense to have more than one observer listening to OnChange values. A good example in this regard are the EditLink observers used to link a TEdit component with TDataSet sources. As the field can modify the edit value, it would not make sense for the edit component to modify other values besides the TDataSet.

Just as a TEdit can be linked to a TLabel, it can also link its value to a TButton. Here you can use a GetMultiCastObserver.

See Also