Hi,
I have a (Favourite_List)List containing Number of Long Type. If i use the command
I get the ClasscastException
Is there any way to convert Long Type to Int type or vice versa?
Kindly let me know
Regards,
SK
I have a (Favourite_List)List containing Number of Long Type. If i use the command
B4X:
Favourite_List.Sort(True)
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
at java.lang.Long.compareTo(Long.java:32)
at java.util.ComparableTimSort.binarySort(ComparableTimSort.java:228)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:154)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:142)
at java.util.Arrays.sort(Arrays.java:1973)
at java.util.Collections.sort(Collections.java:1867)
at anywheresoftware.b4a.objects.collections.List.Sort(List.java:144)
at com.bayalu.KannadaSankalana.main._ulv_main_load(main.java:3898)
at com.bayalu.KannadaSankalana.main._get_selected_screen(main.java:1680)
at com.bayalu.KannadaSankalana.main._ulv_sidebar_itemclick(main.java:4123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA$2.run(BA.java:285)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5155)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:756)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:572)
at miui.dexspy.DexspyInstaller.main(DexspyInstaller.java:171)
at dalvik.system.NativeStart.main(Native Method)
at java.lang.Long.compareTo(Long.java:32)
at java.util.ComparableTimSort.binarySort(ComparableTimSort.java:228)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:154)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:142)
at java.util.Arrays.sort(Arrays.java:1973)
at java.util.Collections.sort(Collections.java:1867)
at anywheresoftware.b4a.objects.collections.List.Sort(List.java:144)
at com.bayalu.KannadaSankalana.main._ulv_main_load(main.java:3898)
at com.bayalu.KannadaSankalana.main._get_selected_screen(main.java:1680)
at com.bayalu.KannadaSankalana.main._ulv_sidebar_itemclick(main.java:4123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA$2.run(BA.java:285)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5155)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:756)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:572)
at miui.dexspy.DexspyInstaller.main(DexspyInstaller.java:171)
at dalvik.system.NativeStart.main(Native Method)
Is there any way to convert Long Type to Int type or vice versa?
Kindly let me know
Regards,
SK