Jump to content
Rafal.B

Delphi12 TFlowLayout throws an exception

Recommended Posts

Hello everyone.
I reported the issue to QE https://quality.embarcadero.com/browse/RSP-43299
However, I don't know if and when they will deal with it.

A quick review indicates that the problem is the "TFlowLayout.DoRealign" routine in the "FMX.Layouts.pas" file.
The extra few lines of code (not present in 11.3) cause the problem.

Fixing this issue in your own project by adding a modified "FMX.Layouts.pas" file to the project works.
Once compiled, the program runs without any problems.

For me, the bigger issue is design time.
Opening the form for editing permanently generates errors:
"... List index out of range (2). Range of TList<FMX.Controls.TControl> is 0"1.
Ignore the error and continue? NOTE: ..."

I think "c:\program files (x86)\embarcadero\studio\23.0\bin\dclfmxstd290.bpl" is responsible for this
Is there any way to solve this problem in-house, faster than Embarcadero?

 

I worked with Delphi a long time ago, it was version 4.
I don't know all these new things and intricacies yet, so please forgive my ignorance 🙂

Share this post


Link to post

Embarcadero boasts that it fixed this problem in patch 12.1.
Unfortunately, only half. It works fine at runtime (that's all, I managed to fix it myself a long time ago).
At design time, the problem still persists.
To check this:
in the project I attached to RSP-44319, select Button1, Button2 and Button3 at the same time.
Then, in the Object Inspector, set the "Visibe" parameter to False.
I'm getting the error "List index out of range (3). The range of TList<FMX.Controls.TControl> is 0”2”.

I have my own TFrame based components and I often use TFlowLayout there.
The visibility of these elements is set using the appropriate "property" added.
Opening a form containing such components always resulted in this error.
To work around this problem, I placed an additional element (e.g. Button) with dimensions 0.0 on the TFlowLayout.
However, when executing "not (csDesigning in ComponentState)", I remove this element so that everything is displayed correctly.

But that's not how it's supposed to work. :classic_mellow:

 

Unfortunately, quality.embarcadero.com doesn't work and I have no way to report it.

 

 

Erratum:
A downloadable version has just been released:
"RAD Studio, Delphi, C++Builder 12.0 Inline with patch 1 ISO"
I uninstalled the previous version of D12 with a separate patch and cleaned the directory.
I downloaded the new version, installed it and IT WORKS CORRECTLY 🙂
I'll test it again, but it seems ok.

Edited by Rafal.B

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×