Zero7 Member Mar 25, 2025 #1 Hello, AS Settings library (2.19) seems that have a bug with more than 15 items (or something similar). Using the basic example (https://www.b4x.com/android/forum/attachments/as-settings-example-zip.158165/) and adding this to [B4XPage_Created] event can be reproduce the crash: B4X: For i = 0 To 15 AS_Settings1.MainPage.AddProperty_Text("Advanced","PropertyName_8","Text Example","",Null,"Test",100dip,AS_Settings1.InputType_Text) Next On scroll the settings page, you will get a RuntimeExeception everytime you scroll up and down: Rich (BB code): (RuntimeException) java.lang.RuntimeException: Object should first be initialized (B4XView). Any idea?
Hello, AS Settings library (2.19) seems that have a bug with more than 15 items (or something similar). Using the basic example (https://www.b4x.com/android/forum/attachments/as-settings-example-zip.158165/) and adding this to [B4XPage_Created] event can be reproduce the crash: B4X: For i = 0 To 15 AS_Settings1.MainPage.AddProperty_Text("Advanced","PropertyName_8","Text Example","",Null,"Test",100dip,AS_Settings1.InputType_Text) Next On scroll the settings page, you will get a RuntimeExeception everytime you scroll up and down: Rich (BB code): (RuntimeException) java.lang.RuntimeException: Object should first be initialized (B4XView). Any idea?
Alexander Stolte Expert Licensed User Longtime User Mar 26, 2025 #2 I had tried to fix this before, but couldn't find a way, so I added a try catch at this point. 6 months later I have now found a solution for the problem, please test the b4xlib in the attachment. Attachments AS_Settings.b4xlib AS_Settings.b4xlib 26.2 KB · Views: 280 Upvote 0
I had tried to fix this before, but couldn't find a way, so I added a try catch at this point. 6 months later I have now found a solution for the problem, please test the b4xlib in the attachment.
Zero7 Member Mar 27, 2025 #3 Hello, thank you for the fix. I will try it tomorrow and I will report you back. Upvote 0
Zero7 Member Mar 28, 2025 #4 Alexander Stolte said: I had tried to fix this before, but couldn't find a way, so I added a try catch at this point. 6 months later I have now found a solution for the problem, please test the b4xlib in the attachment. Click to expand... Fixed. Even with 1k items works well. Thank you. Upvote 0
Alexander Stolte said: I had tried to fix this before, but couldn't find a way, so I added a try catch at this point. 6 months later I have now found a solution for the problem, please test the b4xlib in the attachment. Click to expand... Fixed. Even with 1k items works well. Thank you.
Alexander Stolte Expert Licensed User Longtime User Mar 29, 2025 #5 Zero7 said: Even with 1k items works well. Click to expand... I'm glad that lazy loading also works Upvote 0
Zero7 Member Mar 30, 2025 #6 Alexander Stolte said: I'm glad that lazy loading also works Click to expand... Yeah. Can you ask, because I cannot find the option to remove a item? For example, if I added a Description with: B4X: AS_Settings1.MainPage.AddDescriptionItem("Players", "bla bla") How I can remove it, without recreate all again? just that item on the visible of options. Upvote 0
Alexander Stolte said: I'm glad that lazy loading also works Click to expand... Yeah. Can you ask, because I cannot find the option to remove a item? For example, if I added a Description with: B4X: AS_Settings1.MainPage.AddDescriptionItem("Players", "bla bla") How I can remove it, without recreate all again? just that item on the visible of options.
Alexander Stolte Expert Licensed User Longtime User Mar 30, 2025 #7 New question -> New thread Upvote 0