[Lazarus] Application.OnShowHint problem

Flávio Etrusco flavio.etrusco at gmail.com
Sun Mar 30 19:50:08 CEST 2014


On Sun, Mar 30, 2014 at 12:21 PM, Frank Poretzky
<poretzky at nym.mixmin.net> wrote:
> Hi Graeme,
>
> on Sun, 30 Mar 2014 10:09:31 +0100, you wrote:
>
>>On 2014-03-30 04:45, Frank Poretzky wrote:
>>>
>>> | procedure TFormTest.DoAppOnShowHint( var HintStr: String;
>>> |                                      var CanShow: Boolean;
>>> |                                      var HintInfo: THintInfo);
>>> |   begin
>>> |     CanShow := true;
>>> |     HintStr := HintStr + ' - Modified';
>>> |   end;
>>
>>
>>Does the DoAppOnShowHint() actually execute? If you set a breakpoint in
>>that method, does it get triggered?
>
> No, it doesn't, which exactly is my problem.
>
> Frank
>

There's a bug in application.inc, line 816. OnShowHint only executes
if there are hint handlers registered:

(...)
  i:=FApplicationHandlers[ahtShowHint].Count;
  if CanShow and (i>0) then begin
    if Assigned(FOnShowHint) then
      FOnShowHint(HintInfo.HintStr, CanShow, HintInfo);
(...)

Regards,
Flávio




More information about the Lazarus mailing list