Hello,
DoAllAutoSize is causing problems with some of my controls. It either hangs in infinite loops or raises exceptions. Can I disable it? My controls worked fine with older LCL versions so I just want to work it like it used to.
Cheers,
Tobias

Mailing lists / lazarus / 2010-07
7 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello,
DoAllAutoSize is causing problems with some of my controls. It either hangs in infinite loops or raises exceptions. Can I disable it? My controls worked fine with older LCL versions so I just want to work it like it used to.
Cheers,
Tobias
Hello, DoAllAutoSize is causing problems with some of my controls. It either hangs in infinite loops or raises exceptions. Can I disable it?
You can only delay it.
It is responsible for creating handles, layouting and turning handles visible in the right order.
I started a list how other users created endless loops with the new autosizing:
http://wiki.lazarus.freepascal.org/Autosize_/_Layout#I_get_an_infinite_loop_.2F_How_to_debug_autosizing.3F
If you get an exception, then you are doing something wrong.
My controls worked fine with older LCL versions so I just want to work it like it used to.
Keep in mind, that the old autosize code had to work with buggy widgetsets and therefore had to silently ignore some errors. Since these bugs were fixed the new autosize can now raise an exception when it spots an inconsistency or an endless loop.
Mattias
Mattias Gaertner wroteKeep in mind, that the old autosize code had to work with buggy widgetsets and therefore had to silently ignore some errors. Since these bugs were fixed the new autosize can now raise an exception when it spots an inconsistency or an endless loop.
how many times thru the loop before the exception is raised? or does it count travels thru the loop to determine an endless loop?
TWinControl.AlignControls and TAnchorSide.GetSidePosition stop after ControlCount number of runs.
DoAllAutoSize did not stop. I added a counter. The LCL now raises an exception.
Tobias, please test.
Mattias
OK, thanks! Should it be in the next daily snapshot?
Cheers,
Tobias
I guess yes.
If you test under OS X carbon: there are still some bugs in the sizing and size computation. So maybe it is not your code and not the DoAllAutoSize, but simply one of those.
Mattias
On Mon, 19 Jul 2010 21:02:37 -0400 TWinControl.AlignControls and…
Brilliant! It points me right to the buggy component. It's one of my own, so I can just fix it.
Cheers,
Tobias