Gianni Sassanelli Active Member Licensed User Longtime User Sep 1, 2024 #1 Hi as from subject i need to know if is possible to make a customview starting from B4XComboBox i'm trying but unsuccessfully error is this and fire when i try to use SetItems from my page I attach a simply project to test my contes. --------- beginning of system ** Service (starter) Start ** ** Activity (main) Create (first time) ** Error occurred on line: 59 (B4XComboBox) java.lang.RuntimeException: Class instance was not initialized (b4xcombobox) at anywheresoftware.b4a.debug.Debug.shouldDelegate(Debug.java:242) at b4a.example.b4xcombobox._setitems(b4xcombobox.java:53) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157) at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262) at b4a.example.b4xmainpage._b4xpage_created(b4xmainpage.java:48) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318) at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1087) at b4a.example.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:1070) at b4a.example.b4xpagesmanager._showpage(b4xpagesmanager.java:427) at b4a.example.b4xpagesmanager._addpage(b4xpagesmanager.java:247) at b4a.example.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:261) at b4a.example.b4xpagesmanager._initialize(b4xpagesmanager.java:167) at b4a.example.main._activity_create(main.java:418) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157) at b4a.example.main.afterFirstLayout(main.java:105) at b4a.example.main.access$000(main.java:17) at b4a.example.main$WaitForLayout.run(main.java:83) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:236) at android.app.ActivityThread.main(ActivityThread.java:7876) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967) Attachments TEST_01.zip TEST_01.zip 12.1 KB · Views: 266 Last edited: Sep 2, 2024
Hi as from subject i need to know if is possible to make a customview starting from B4XComboBox i'm trying but unsuccessfully error is this and fire when i try to use SetItems from my page I attach a simply project to test my contes. --------- beginning of system ** Service (starter) Start ** ** Activity (main) Create (first time) ** Error occurred on line: 59 (B4XComboBox) java.lang.RuntimeException: Class instance was not initialized (b4xcombobox) at anywheresoftware.b4a.debug.Debug.shouldDelegate(Debug.java:242) at b4a.example.b4xcombobox._setitems(b4xcombobox.java:53) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157) at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262) at b4a.example.b4xmainpage._b4xpage_created(b4xmainpage.java:48) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318) at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1087) at b4a.example.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:1070) at b4a.example.b4xpagesmanager._showpage(b4xpagesmanager.java:427) at b4a.example.b4xpagesmanager._addpage(b4xpagesmanager.java:247) at b4a.example.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:261) at b4a.example.b4xpagesmanager._initialize(b4xpagesmanager.java:167) at b4a.example.main._activity_create(main.java:418) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157) at b4a.example.main.afterFirstLayout(main.java:105) at b4a.example.main.access$000(main.java:17) at b4a.example.main$WaitForLayout.run(main.java:83) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:236) at android.app.ActivityThread.main(ActivityThread.java:7876) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Alexander Stolte Expert Licensed User Longtime User Sep 1, 2024 #2 Gianni Sassanelli said: i need to know if is possible to make a customview starting from B4XComboBox Click to expand... yes it is possible. You have a Sleep(0) in the custom view DesignerCreateView sub, then you need a Sleep(0) in the B4XMainPage too, because of the Sleep(0) in the tscmb. Attachments TEST_01.zip TEST_01.zip 6.5 KB · Views: 309 Upvote 0
Gianni Sassanelli said: i need to know if is possible to make a customview starting from B4XComboBox Click to expand... yes it is possible. You have a Sleep(0) in the custom view DesignerCreateView sub, then you need a Sleep(0) in the B4XMainPage too, because of the Sleep(0) in the tscmb.
Gianni Sassanelli Active Member Licensed User Longtime User Sep 2, 2024 #3 Alexander Stolte said: yes it is possible. You have a Sleep(0) in the custom view DesignerCreateView sub, then you need a Sleep(0) in the B4XMainPage too, because of the Sleep(0) in the tscmb. Click to expand... thank's Alexander, i don't have error, but my combo don't ave any item inserted Upvote 0
Alexander Stolte said: yes it is possible. You have a Sleep(0) in the custom view DesignerCreateView sub, then you need a Sleep(0) in the B4XMainPage too, because of the Sleep(0) in the tscmb. Click to expand... thank's Alexander, i don't have error, but my combo don't ave any item inserted
Gianni Sassanelli Active Member Licensed User Longtime User Sep 2, 2024 #4 Solved. Don't need initialize in Class module Thank's Alexander B4X: Public Sub Load_Cmb(Input As List) 'next line is not required 'xCmb.cmbBox.Initialize("cmbBox") xCmb.SetItems(Input) End Sub Upvote 0
Solved. Don't need initialize in Class module Thank's Alexander B4X: Public Sub Load_Cmb(Input As List) 'next line is not required 'xCmb.cmbBox.Initialize("cmbBox") xCmb.SetItems(Input) End Sub