From ed1095fdd140168f9a9cfa2f61bd7cbbf493ab72 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 24 Nov 2009 17:11:57 +0200 Subject: Fix AV under Windows for Calendar Combo mediator. It was a descendant of Edit Meditaros and assumed TfpgCalendarCombo descended from TfpgBaseEdit, which in fact it wasn't!! Oops. Strangely enough Linux never gave any errors??? --- extras/tiopf/gui/tiMediators.pas | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'extras') diff --git a/extras/tiopf/gui/tiMediators.pas b/extras/tiopf/gui/tiMediators.pas index c0b127b4..bc1f2c4e 100644 --- a/extras/tiopf/gui/tiMediators.pas +++ b/extras/tiopf/gui/tiMediators.pas @@ -214,9 +214,10 @@ type { Base class to handle TfpgCalendarCombo controls } - TtiCalendarComboMediatorView = class(TtiBaseEditMediatorView) + TtiCalendarComboMediatorView = class(TtiControlMediatorView) protected procedure SetupGUIandObject; override; + procedure SetObjectUpdateMoment(const AValue: TtiObjectUpdateMoment); override; public constructor Create; override; function View: TfpgCalendarCombo; reintroduce; @@ -792,6 +793,17 @@ begin end; end; +procedure TtiCalendarComboMediatorView.SetObjectUpdateMoment( + const AValue: TtiObjectUpdateMoment); +begin + inherited SetObjectUpdateMoment(AValue); + if View <> nil then + if ObjectUpdateMoment in [ouOnChange,ouCustom] then + View.OnChange := @DoOnChange + else + View.OnExit := @DoOnChange; +end; + constructor TtiCalendarComboMediatorView.Create; begin inherited Create; -- cgit v1.2.3-70-g09d2