diff options
-rw-r--r-- | extras/tiopf/gui/tiCompositeMediators.pas | 1 | ||||
-rw-r--r-- | extras/tiopf/gui/tiGenericEditMediators.pas | 8 |
2 files changed, 8 insertions, 1 deletions
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; |