New Project custom dialog my library, error
Event CallBack
' /// Log
classmydialog_continue_click (B4A line: 93)
If SubExists(ContinueCallBack,ContinueEventName & "_Click") Then
java.lang.ClassCastException: java.lang.Object
at anywheresoftware.b4a.keywords.Common.getComponentBA(Common.java:997)
at anywheresoftware.b4a.keywords.Common.SubExists(Common.java:786)
at b4a.example.classmydialog._continue_click(classmydialog.java:99)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:154)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:64)
at android.view.View.performClick(View.java:2408)
at android.view.View$PerformClick.run(View.java:8816)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
B4X:
If typebutton = 1 Then
btn1.Initialize("Continue")
btn1.Text = "Continue"
btn1.TextSize = 11
panel1.AddView(btn1,2.5%x,panel1.Height-70,85%x,60)
End If
Event CallBack
B4X:
Sub Continue_Click
Dim ContinueEventName As String
Dim ContinueCallBack As Object
If SubExists(ContinueCallBack,ContinueEventName & "_Click") Then '< error
Dim v As View
v = Sender
CallSub(ContinueCallBack, ContinueEventName & "_Click")
End If
End Sub
' /// Log
classmydialog_continue_click (B4A line: 93)
If SubExists(ContinueCallBack,ContinueEventName & "_Click") Then
java.lang.ClassCastException: java.lang.Object
at anywheresoftware.b4a.keywords.Common.getComponentBA(Common.java:997)
at anywheresoftware.b4a.keywords.Common.SubExists(Common.java:786)
at b4a.example.classmydialog._continue_click(classmydialog.java:99)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:154)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:64)
at android.view.View.performClick(View.java:2408)
at android.view.View$PerformClick.run(View.java:8816)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)