S Sergio83 Active Member Licensed User Longtime User Jun 1, 2024 #1 Hello everybody, I'm facing a run time error regarding ScrollPane use. I've defined a ScrollPane with the designer which created the statement in class_global section B4X: Private SV_nicknames As ScrollPane I initialize this ScrollPane in the b4xpage_appear sub B4X: SV_nicknames.SetVScrollVisibility("ALWAYS") SV_nicknames.LoadLayout("ScrollPane.bjl", 0, 0) pnl_item_node_nicknames=SV_nicknames.innernode At run time I get this error (line 1 of blok above) : B4X: Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events. b4xpage_accueil$ResumableSub_b4xpage_appear.resume (java line: 766) java.lang.RuntimeException: Object should first be initialized (ScrollPane). at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:49) at anywheresoftware.b4j.objects.ScrollPaneWrapper.SetVScrollVisibility(ScrollPaneWrapper.java:134) at serisyvis.gestenv.b4xpage_accueil$ResumableSub_b4xpage_appear.resume(b4xpage_accueil.java:766) at serisyvis.gestenv.b4xpage_accueil._b4xpage_appear(b4xpage_accueil.java:742) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111) at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:514) at anywheresoftware.b4a.keywords.Common.access$0(Common.java:494) at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:568) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428) at java.base/java.security.AccessController.doPrivileged(Native Method) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174) at java.base/java.lang.Thread.run(Thread.java:834) java.lang.NullPointerException I have other B4J app where I use ScrollPane with the same statements and I've no run time error. I've searched the forum and Google with no success. Could some one of you help me to fix this issue. Thanks to you by advance
Hello everybody, I'm facing a run time error regarding ScrollPane use. I've defined a ScrollPane with the designer which created the statement in class_global section B4X: Private SV_nicknames As ScrollPane I initialize this ScrollPane in the b4xpage_appear sub B4X: SV_nicknames.SetVScrollVisibility("ALWAYS") SV_nicknames.LoadLayout("ScrollPane.bjl", 0, 0) pnl_item_node_nicknames=SV_nicknames.innernode At run time I get this error (line 1 of blok above) : B4X: Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events. b4xpage_accueil$ResumableSub_b4xpage_appear.resume (java line: 766) java.lang.RuntimeException: Object should first be initialized (ScrollPane). at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:49) at anywheresoftware.b4j.objects.ScrollPaneWrapper.SetVScrollVisibility(ScrollPaneWrapper.java:134) at serisyvis.gestenv.b4xpage_accueil$ResumableSub_b4xpage_appear.resume(b4xpage_accueil.java:766) at serisyvis.gestenv.b4xpage_accueil._b4xpage_appear(b4xpage_accueil.java:742) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111) at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:514) at anywheresoftware.b4a.keywords.Common.access$0(Common.java:494) at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:568) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428) at java.base/java.security.AccessController.doPrivileged(Native Method) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174) at java.base/java.lang.Thread.run(Thread.java:834) java.lang.NullPointerException I have other B4J app where I use ScrollPane with the same statements and I've no run time error. I've searched the forum and Google with no success. Could some one of you help me to fix this issue. Thanks to you by advance
DonManfred Expert Licensed User Longtime User Jun 1, 2024 #2 Sergio83 said: Could some one of you help me to fix this issue. Click to expand... Where is the projectupload showing the problem? Noone can help you with the information you provided. Upvote 0
Sergio83 said: Could some one of you help me to fix this issue. Click to expand... Where is the projectupload showing the problem? Noone can help you with the information you provided.
S Sergio83 Active Member Licensed User Longtime User Jun 1, 2024 #3 Hello Don, This project is an app for management of finger print sensors. Here is the upload Attachments GESTFP.zip GESTFP.zip 79.9 KB · Views: 394 Upvote 0
Sagenut Expert Licensed User Longtime User Jun 1, 2024 #4 The view you are referring to (SV_capteurs) it's in the layout "pnlgestcapteur". But in the B4XMainPage you load the "accueil" layout. So the view it's not present. At least at a first fast look. Upvote 0
The view you are referring to (SV_capteurs) it's in the layout "pnlgestcapteur". But in the B4XMainPage you load the "accueil" layout. So the view it's not present. At least at a first fast look.
W walt61 Well-Known Member Licensed User Longtime User Jun 1, 2024 #5 Damn, @Sagenut beat me to it. Indeed: ScrollPane SV_capteurs is a view in layout 'pnlgestcapteur' but you didn't load that layout yet (it's only done in Sub btn_admin_capteur_Click) so the view is still uninitialised in Sub b4xpage_appear. Similar for SV_nicknames. Upvote 0
Damn, @Sagenut beat me to it. Indeed: ScrollPane SV_capteurs is a view in layout 'pnlgestcapteur' but you didn't load that layout yet (it's only done in Sub btn_admin_capteur_Click) so the view is still uninitialised in Sub b4xpage_appear. Similar for SV_nicknames.
Sagenut Expert Licensed User Longtime User Jun 1, 2024 #6 Anyway we went out of road, because the question was about another view. But I got that error first and checked about it. @Alexander Stolte got it right. Upvote 0
Anyway we went out of road, because the question was about another view. But I got that error first and checked about it. @Alexander Stolte got it right.
Alexander Stolte Expert Licensed User Longtime User Jun 1, 2024 #7 Sagenut said: @Alexander Stolte got it right. Click to expand... i'm not so sure anymore, because it loads the scrollview via designer, i thought it wanted to initialize it in the code. Upvote 0
Sagenut said: @Alexander Stolte got it right. Click to expand... i'm not so sure anymore, because it loads the scrollview via designer, i thought it wanted to initialize it in the code.
S Sergio83 Active Member Licensed User Longtime User Jun 1, 2024 #8 Many thanks to all of you. I thought it was dum and enormous! Indeed it is ... Thanks again Upvote 0