C cmweb Active Member Licensed User Longtime User Dec 30, 2012 #1 Hey, hello, with B4A 2.3 I'm getting a NullPointerException when loading a Layout to a Panel: Code: dim setscroll as ScrollView setscroll.Initialize(Main.hoehe) setscroll.Panel.LoadLayout("settings") '->> results in a NullPointerException saveerror = False This code worked without any problems in previous B4A versions. How can I get around this error? Best regards, Carsten
Hey, hello, with B4A 2.3 I'm getting a NullPointerException when loading a Layout to a Panel: Code: dim setscroll as ScrollView setscroll.Initialize(Main.hoehe) setscroll.Panel.LoadLayout("settings") '->> results in a NullPointerException saveerror = False This code worked without any problems in previous B4A versions. How can I get around this error? Best regards, Carsten
thedesolatesoul Expert Licensed User Longtime User Dec 30, 2012 #2 I had the same problem. Make sure the scrollview is added to the activity before you load the layout inside the scrollview. Upvote 0
I had the same problem. Make sure the scrollview is added to the activity before you load the layout inside the scrollview.
Erel B4X founder Staff member Licensed User Longtime User Dec 30, 2012 #3 This is a bug in v2.30. As written above you should first add the ScrollView to its parent and then load the layout. This is actually the correct way to load the layout as otherwise the panel size will be 0 and if there is any designer script code in the layout file it will not work correctly. Upvote 0
This is a bug in v2.30. As written above you should first add the ScrollView to its parent and then load the layout. This is actually the correct way to load the layout as otherwise the panel size will be 0 and if there is any designer script code in the layout file it will not work correctly.
C cmweb Active Member Licensed User Longtime User Dec 30, 2012 #4 thedesolatesoul said: I had the same problem. Make sure the scrollview is added to the activity before you load the layout inside the scrollview. Click to expand... Excellent... thank you. That solved the problem... Best regards, Carsten Upvote 0
thedesolatesoul said: I had the same problem. Make sure the scrollview is added to the activity before you load the layout inside the scrollview. Click to expand... Excellent... thank you. That solved the problem... Best regards, Carsten