mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 08:20:36 +02:00
LCL: added debugging
git-svn-id: trunk@21808 -
This commit is contained in:
parent
010d61cf7c
commit
d2c58feec2
@ -7604,10 +7604,26 @@ end;
|
||||
function TWinControl.RealGetText: TCaption;
|
||||
begin
|
||||
Result := '';
|
||||
{$IFDEF VerboseTWinControlRealText}
|
||||
DebugLn(['TWinControl.RealGetText ',DbgSName(Self),' HandleAllocated=',HandleAllocated,' csLoading=',csLoading in ComponentState,' ']);
|
||||
if not HandleAllocated
|
||||
or (csLoading in ComponentState) then begin
|
||||
DebugLn(['TWinControl.RealGetText using inherited RealGetText']);
|
||||
Result := inherited RealGetText;
|
||||
end else begin
|
||||
DebugLn(['TWinControl.RealGetText using ',DbgSName(WidgetSetClass),' GetText']);
|
||||
if (not TWSWinControlClass(WidgetSetClass).GetText(Self, Result)) then begin
|
||||
DebugLn(['TWinControl.RealGetText FAILED, using RealGetText']);
|
||||
Result := inherited RealGetText;
|
||||
end;
|
||||
end;
|
||||
DebugLn(['TWinControl.RealGetText Result="',Result,'"']);
|
||||
{$ELSE}
|
||||
if not HandleAllocated
|
||||
or (csLoading in ComponentState)
|
||||
or (not TWSWinControlClass(WidgetSetClass).GetText(Self, Result))
|
||||
then Result := inherited RealGetText;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -7635,6 +7651,9 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TWinControl.RealSetText(const AValue: TCaption);
|
||||
begin
|
||||
{$IFDEF VerboseTWinControlRealText}
|
||||
DebugLn(['TWinControl.RealSetText ',DbgSName(Self),' AValue="',AValue,'" HandleAllocated=',HandleAllocated,' csLoading=',csLoading in ComponentState]);
|
||||
{$ENDIF}
|
||||
if HandleAllocated and (not (csLoading in ComponentState)) then
|
||||
begin
|
||||
WSSetText(AValue);
|
||||
@ -7643,6 +7662,9 @@ begin
|
||||
AdjustSize;
|
||||
end
|
||||
else inherited RealSetText(AValue);
|
||||
{$IFDEF VerboseTWinControlRealText}
|
||||
DebugLn(['TWinControl.RealSetText ',DbgSName(Self),' END']);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user