Hi,
Error for Label1 Clicked for B4XComobox1
java.lang.RuntimeException: Method: performClick not found in: b4a.example.b4xcombobox
at anywheresoftware.b4j.object.JavaObject$MethodCache.getMethod(JavaObject.java:366)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:119)
at b4a.example.b4xmainpage._label1_click(b4xmainpage.java:121)
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:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:6257)
at android.widget.TextView.performClick(TextView.java:11145)
at android.view.View$PerformClick.run(View.java:23705)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6836)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
- I have a simple example of B4XComboBox and Spinner. when I do JavaObject. RunMethod("performClick",Null) it works on Spinner but not on B4XComboBox (see attached picture)
- Is it possible to have "perform click" another way/other means for B4XComboBox?
- Any help is appreciated
B4X:
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
B4XComboBox1.cmbBox.AddAll(Array As String("Monday","tuesday","Friday","test1"))
Spinner1.AddAll(Array As String("Monday","tuesday","Friday","test2"))
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub Label1_Click
Dim j As JavaObject = B4XComboBox1
j.RunMethod("performClick",Null)
End Sub
Sub Label2_Click
Dim j As JavaObject = Spinner1
j.RunMethod("performClick",Null)
End Sub
Error for Label1 Clicked for B4XComobox1
java.lang.RuntimeException: Method: performClick not found in: b4a.example.b4xcombobox
at anywheresoftware.b4j.object.JavaObject$MethodCache.getMethod(JavaObject.java:366)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:119)
at b4a.example.b4xmainpage._label1_click(b4xmainpage.java:121)
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:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:6257)
at android.widget.TextView.performClick(TextView.java:11145)
at android.view.View$PerformClick.run(View.java:23705)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6836)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Attachments
Last edited: