From 6b227a12b5233ec4bac8f74e8cce64e49b5858ff Mon Sep 17 00:00:00 2001 From: graemeg Date: Tue, 10 Jun 2008 14:57:35 +0000 Subject: * minor mediator changes. --- extras/tiopf/gui/tiCompositeMediators.pas | 1 - extras/tiopf/gui/tiGenericEditMediators.pas | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'extras/tiopf/gui') diff --git a/extras/tiopf/gui/tiCompositeMediators.pas b/extras/tiopf/gui/tiCompositeMediators.pas index 1d4ac348..e9fe022a 100644 --- a/extras/tiopf/gui/tiCompositeMediators.pas +++ b/extras/tiopf/gui/tiCompositeMediators.pas @@ -786,7 +786,6 @@ end; procedure TCompositeStringGridMediator.Update(ASubject: TtiObject); begin - writeln('Mediator.Update'); Assert(FModel = ASubject); RebuildStringGrid; end; diff --git a/extras/tiopf/gui/tiGenericEditMediators.pas b/extras/tiopf/gui/tiGenericEditMediators.pas index b59113c2..6e24fe2e 100644 --- a/extras/tiopf/gui/tiGenericEditMediators.pas +++ b/extras/tiopf/gui/tiGenericEditMediators.pas @@ -96,6 +96,7 @@ type procedure UpdateGuiValidStatus(pErrors: TtiObjectErrors); override; public constructor CreateCustom(pEditControl: TfpgWidget; pSubject: TtiObject; pFieldName: string; pGuiFieldName: string = 'Text'); reintroduce; + destructor Destroy; override; property EditControl: TfpgEdit read GetEditControl write SetEditControl; class function ComponentClass: TClass; override; end; @@ -549,6 +550,13 @@ begin inherited; end; +destructor TMediatorEditView.Destroy; +begin + if Assigned(EditControl.OnChange) then + EditControl.OnChange := nil; + inherited Destroy; +end; + class function TMediatorEditView.ComponentClass: TClass; begin Result := TfpgEdit; -- cgit v1.2.3-70-g09d2