sjordi 39 Posted May 31, 2022 (edited) Hi all, Just spent 3 days pulling my hair trying to understand why a list view is crashing each time I remove the grouping option for iOS. You know, if you set the ListView.ControlType to Platform, add FillHeader + FillBreak in Visual Binding (with custom format as "SubString(%s, 0, 1)"), on iOS you get your list displayed with Alphabetic groups and the nice vertical Alphabet index on the right to quickly navigate in the list. Works fine. Now if I sort my list using another non alphabetical parameter, I have to disable that index first. So I remove the visual binding to the list Headers. LinkListControlToField1.FillBreakCustomFormat := '' ; LinkListControlToField1.FillBreakFieldName := '' ; LinkListControlToField1.FillHeaderFieldName := ''; LinkListControlToField1.FillHeaderCustomFormat := '' ; Problem is that it crashes each time (also on Android), telling me that the value I pass is "out of range". It's fine on Windows and macOS. Now I think I found the reason... if I set the ListView.ControlType to "Styled" instead of "Platform", everything is fine, no crash (but no index either on iOS). As a workaround, I actually switch the ControlType to Styled, remove the links, and set it back to Platform. Of course it's not elegant. Could someone try the attached project and tell me if it crashed too on your side: iOS, iPadOS? The db is test.sqlite and should normally be deployed to your app. As-is, it should work. If it works, then try to comment out ListView1.BeginUpdate ; ListView1.ControlType := TControlType.Styled ; and ListView1.ControlType := TControlType.Platform ; ListView1.EndUpdate ; in the TForm1.ToolBar1Click procedure. Does it crash now that you stay in Platform mode instead of Styled? Any idea if I'm doing something wrong or if this is a bug, in which case I will open a bug report at QC (Embarcadero) Thanks for your help. Steve ListIndexed.zip Edited May 31, 2022 by sjordi Share this post Link to post
corneliusdavid 214 Posted May 31, 2022 I confirm this crashes on my iPad when those 4 lines are commented out. It's not a terribly inelegant work-around but since the same code doesn't crash on Win/MacOS, it does seem like there's a bug in there. Share this post Link to post
sjordi 39 Posted June 1, 2022 Thanks for trying. I'm opening a bug report It seems that even if you don't remove any kind of binds, but just update the database content, it is enough to have it crash. Any kind of dataset change would do... Share this post Link to post
sjordi 39 Posted June 1, 2022 Bug case opened https://quality.embarcadero.com/browse/RSP-38354 1 Share this post Link to post
sjordi 39 Posted June 2, 2022 Another one. If ControlType =Platform, then OnItemClickEX always return 0,0 as touch coordinates... Looks like the "Platform" type is poorly implemented. https://quality.embarcadero.com/browse/RSP-38364 Share this post Link to post