TReferenceList.Add Method

Overload List

#SignatureDescription
1procedure Add(Src: TMtxComponent);Add a reference of Src to Self and also a reference of Self to Src.
2procedure Add(Src: TReferenceList; Event: TNotifyEvent; CompSrc: TObject);Add a reference to Src to Self and also a reference of Self to Src.

Overload 1: procedure Add(Src: TMtxComponent);

Add a reference of Src to Self and also a reference of Self to Src.

#NameTypeDescription
1SrcTMtxComponent

Result: stored in self (calling object)

Remarks:

Event that will be called, when the connected component is destroyed is the method TMtxComponent.RemoveReference. The parameter passed to the method will be the pointer of the component (and not of its TReferenceList) that is being destroyed.

Overload 2: procedure Add(Src: TReferenceList; Event: TNotifyEvent; CompSrc: TObject);

Add a reference to Src to Self and also a reference of Self to Src.

#NameTypeDescription
1SrcTReferenceList
2EventTNotifyEvent
3CompSrcTObject

Result: stored in self (calling object)

Remarks:

Event is the procedure to be called, when the connected component is destroyed.