In some situations the SkinProvider generates an range check error on startup!
I've generated a minimum size form to demonstrate the bug.
Attached you'll find 2 zip-files that contain the same form.
Extract the “Fails” file.
On the window there's nearly nothing. Just 3 panels and 2 buttons, a SkinManager and a SkinProvider.
Make this form the main form of an application and try to run it.
It will crash in sSkinProvider.pas line 6925 with a Range check error.
Now try the “Works” file – NO differences at all, only the create order of 2 panels is switched. This form runs just fine.
Schematic structure of the difference in the dfm-file:
Code:
Fails:
object pnlLeft: TPanel
object pnlWorkflows: TPanel
object pnlSeparator: TPanel
object sButton1: TsButton
object sButton2: TsButton
end
Working:
object pnlLeft: TPanel
object pnlSeparator: TPanel
object sButton1: TsButton
object sButton2: TsButton
object pnlWorkflows: TPanel
end
Strange, isn't it?!