Forum > LCL

Incompatibility of TCustomForm.DoShow in Lazarus 2.2

(1/1)

tetrastes:
I have a working program, which was compiled with Lazarus 2.0.8. After compiling with Lazarus 2.2.2 it didn't work as expected.  :-\
I found that this is due to incompatibility of TCustomForm.DoShow. In Lazarus 2.0.8 (and in whole 2.0 branch?) the definition is

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TCustomForm.DoShow;begin  if Assigned(FOnShow) then FOnShow(Self);end;
while in Lazarus 2.2.2 (and I suppose in 2.2.0)

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TCustomForm.DoShow;begin  if FIsFirstOnShow and (WindowState in [wsMaximized, wsFullScreen]) then    Exit;  FIsFirstOnShow := False;  if Assigned(FOnShow) then FOnShow(Self);end; This is reflected in CHM help, but not in online help, and not at https://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes#LCL_incompatibilities, though this obviously can break existing code (as it happened to me >:().

So I wonder, what are the sense and purpose of this change, and what is the difference between normal and maximized window, except size?  %)

Navigation

[0] Message Index

Go to full version