S sgarabinas Member Licensed User Longtime User Sep 5, 2014 #1 I use the following code to catch the cell click in a tableview In Rapid Debug it works perfectly bur in Release or Legacy Debug returns a cast exception Sub Cell_Click If Keyb.Visible = False Then NewCell = True Dim rc As ParRowCol Dim l As Label l = Sender rc = l.Tag If CurRow <> rc.Row OR CurCol <> rc.Col Then NewCell = True CurRow = rc.Row CurCol = 2 FillKeyb(CurRow) End If End Sub java.lang.ClassCastException: com.garabinas.dbutils$_rowcol cannot be cast to com.garabinas.modpar$_parrowcol at com.garabinas.modpar._cell_click(modpar.java:943) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:173) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:161) at anywheresoftware.b4a.BA.raiseEvent(BA.java:157) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:66) at android.view.View.performClick(View.java:4452) at android.view.View$PerformClick.run(View.java:18428) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5365) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method) java.lang.ClassCastException: com.garabinas.dbutils$_rowcol cannot be cast to com.garabinas.modpar$_parrowcol
I use the following code to catch the cell click in a tableview In Rapid Debug it works perfectly bur in Release or Legacy Debug returns a cast exception Sub Cell_Click If Keyb.Visible = False Then NewCell = True Dim rc As ParRowCol Dim l As Label l = Sender rc = l.Tag If CurRow <> rc.Row OR CurCol <> rc.Col Then NewCell = True CurRow = rc.Row CurCol = 2 FillKeyb(CurRow) End If End Sub java.lang.ClassCastException: com.garabinas.dbutils$_rowcol cannot be cast to com.garabinas.modpar$_parrowcol at com.garabinas.modpar._cell_click(modpar.java:943) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:173) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:161) at anywheresoftware.b4a.BA.raiseEvent(BA.java:157) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:66) at android.view.View.performClick(View.java:4452) at android.view.View$PerformClick.run(View.java:18428) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5365) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method) java.lang.ClassCastException: com.garabinas.dbutils$_rowcol cannot be cast to com.garabinas.modpar$_parrowcol
klaus Expert Licensed User Longtime User Sep 5, 2014 #2 How is ParRowCol defined ? It seems that the types of ParRowCol and RowCol are different. You should use Dim rc As RowCol. Upvote 0
How is ParRowCol defined ? It seems that the types of ParRowCol and RowCol are different. You should use Dim rc As RowCol.
S sgarabinas Member Licensed User Longtime User Sep 5, 2014 #3 klaus said: How is ParRowCol defined ? It seems that the types of ParRowCol and RowCol are different. You should use Dim rc As RowCol. Click to expand... You are right, didn't notice that. It works fine now. But why in Rapid Debug was working ??? lol Upvote 0
klaus said: How is ParRowCol defined ? It seems that the types of ParRowCol and RowCol are different. You should use Dim rc As RowCol. Click to expand... You are right, didn't notice that. It works fine now. But why in Rapid Debug was working ??? lol
Erel B4X founder Staff member Licensed User Longtime User Sep 7, 2014 #4 But why in Rapid Debug was working ??? Click to expand... The rapid debugger can be too "forgiving" in such cases due to its very dynamic nature. Upvote 0
But why in Rapid Debug was working ??? Click to expand... The rapid debugger can be too "forgiving" in such cases due to its very dynamic nature.