diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2009-01-30 13:36:39 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2009-01-30 13:36:39 +0000 |
commit | 4c590ac929e9df181a336701f870f4906297d8c4 (patch) | |
tree | 18b2784bd9c28e062a5aa2c3921a161cbdfde45c /src/corelib/fpg_main.pas | |
parent | 5cafb41e20578ccbd15489c876e986f01b8f4fc6 (diff) | |
download | fpGUI-4c590ac929e9df181a336701f870f4906297d8c4.tar.xz |
* Removed a potential AV error in hintwindow handling.
Diffstat (limited to 'src/corelib/fpg_main.pas')
-rw-r--r-- | src/corelib/fpg_main.pas | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas index 98dc2033..883c56c7 100644 --- a/src/corelib/fpg_main.pas +++ b/src/corelib/fpg_main.pas @@ -231,6 +231,7 @@ type procedure InternalMsgHintTimer(var msg: TfpgMessageRec); message FPGM_HINTTIMER; procedure CreateHintWindow; procedure HintTimerFired(Sender: TObject); + procedure SetShowHint(const AValue: boolean); protected FDisplayParams: string; FScreenWidth: integer; @@ -261,7 +262,7 @@ type property HintWindow: TfpgWindow read FHintWindow; property ScreenWidth: integer read FScreenWidth; property ScreenHeight: integer read FScreenHeight; - property ShowHint: boolean read FShowHint write FShowHint default True; + property ShowHint: boolean read FShowHint write SetShowHint default True; property StopOnException: Boolean read FStopOnException write FStopOnException; property OnException: TExceptionEvent read FOnException write FOnException; end; @@ -382,10 +383,8 @@ uses math, fpg_imgfmt_bmp, fpg_stdimages, - fpg_extinterpolation, // only so that it get auto compiled fpg_translations, fpg_constants, - fpg_stringutils, fpg_widget, fpg_dialogs, fpg_hint, @@ -1073,12 +1072,20 @@ procedure TfpgApplication.HintTimerFired(Sender: TObject); var w: TfpgWidget; begin + w := nil; // writeln('HintTimerFired...'); w := TfpgWidget(FHintWidget); - ActivateHint(w.WindowToScreen(w, FHintPos), w.Hint); + if Assigned(w) then + ActivateHint(w.WindowToScreen(w, FHintPos), w.Hint); FHintTimer.Enabled := False; end; +procedure TfpgApplication.SetShowHint(const AValue: boolean); +begin +//writeln('>> SetShowHint to :', AValue); + FShowHint := AValue; +end; + procedure TfpgApplication.FreeFontRes(afontres: TfpgFontResource); var n: integer; |