Knoppi Active Member Licensed User Longtime User Nov 18, 2017 #1 (b4j 5.90) ScrollPane with Designer dont Initialize InnerNode Waiting for debugger to connect... Program started. Error occurred on line: 16 (Main) java.lang.RuntimeException: Object should first be initialized (Node). at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:32) at b4j.example.main._appstart(main.java:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:231) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93) at anywheresoftware.b4a.BA.raiseEvent(BA.java:77) at b4j.example.main.start(main.java:38) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) at java.lang.Thread.run(Thread.java:745) Click to expand... it works when i do this: Code: Copy Dim p As Pane p.Initialize( "") ScrollPane1.InnerNode = p p.AddNode( CreateButtonFAS( "Apple", Chr(0xF179), 0xFF1D0080, "btn"), 0,0 ,50 ,50) but throws a error with this: Code: Copy Dim p As Pane = ScrollPane1.InnerNode p.AddNode( CreateButtonFAS( "Apple", Chr(0xF179), 0xFF1D0080, "btn"), 0,0 ,50 ,50) Attachments ScrollView.zip ScrollView.zip 2 KB · Views: 463 Last edited: Nov 18, 2017
(b4j 5.90) ScrollPane with Designer dont Initialize InnerNode Waiting for debugger to connect... Program started. Error occurred on line: 16 (Main) java.lang.RuntimeException: Object should first be initialized (Node). at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:32) at b4j.example.main._appstart(main.java:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:231) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93) at anywheresoftware.b4a.BA.raiseEvent(BA.java:77) at b4j.example.main.start(main.java:38) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) at java.lang.Thread.run(Thread.java:745) Click to expand... it works when i do this: Code: Copy Dim p As Pane p.Initialize( "") ScrollPane1.InnerNode = p p.AddNode( CreateButtonFAS( "Apple", Chr(0xF179), 0xFF1D0080, "btn"), 0,0 ,50 ,50) but throws a error with this: Code: Copy Dim p As Pane = ScrollPane1.InnerNode p.AddNode( CreateButtonFAS( "Apple", Chr(0xF179), 0xFF1D0080, "btn"), 0,0 ,50 ,50)
Erel B4X founder Staff member Licensed User Longtime User Nov 19, 2017 #2 This is by design. You are expected to create the inner pane by calling ScrollPane.LoadLayout. Or create it yourself as you did.
This is by design. You are expected to create the inner pane by calling ScrollPane.LoadLayout. Or create it yourself as you did.