Recent

Author Topic: GetControlClassDefaultSize changed since rev. 25204  (Read 6956 times)

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
GetControlClassDefaultSize changed since rev. 25204
« on: May 05, 2010, 09:04:32 pm »
Virtual class function TControl.GetControlClassDefaultSize seems to be changed in recent revision 25204, so that it's type is TSize instead of TPoint.

TSize and TPoint types are almost the same, so is there any improvement in this change? Code which calls it does not compile, and controls which override this function cannot compile.

Is this change nesessery? I admit that it is not too difficult to adjust the code, but... it breaks backwards compatibility, which is annoying.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Re: GetControlClassDefaultSize changed since rev. 25204
« Reply #1 on: May 05, 2010, 10:05:08 pm »
I guess it was needed somehow. And when changing, better do it now than when we reach 1.0
« Last Edit: May 06, 2010, 08:07:54 am by Marc »
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: GetControlClassDefaultSize changed since rev. 25204
« Reply #2 on: May 06, 2010, 05:52:33 am »
It's changed in r25204 by Paul, there's no explanation in svn log why it is so, I suppose it's for Delphi compatibility.

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: GetControlClassDefaultSize changed since rev. 25204
« Reply #3 on: May 06, 2010, 01:25:42 pm »
I guess it was needed somehow. And when changing, better do it now than when we reach 1.0

I agree, if it was needed somehow...

I suppose it's for Delphi compatibility.

Probably not -- Google on GetControlClassDefaultSize returns only Lazarus pages, so this function probably doesn't exist in Delphi.

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: GetControlClassDefaultSize changed since rev. 25204
« Reply #4 on: May 08, 2010, 01:10:44 am »
Sorry for the change. We expected that it is not used anywhere outside LCL. There was no big need in the change except to use proper existing type for the size - TSize. TPoint should be used for coordinates return, not the size.

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: GetControlClassDefaultSize changed since rev. 25204
« Reply #5 on: May 08, 2010, 06:43:37 am »
Okay, it is appropriate type for this function. As Marc pointed out, although such changes can be a bit annoying, it's surely better to make them now than after version 1 is reached.

 

TinyPortal © 2005-2018