Hi
I have a msgbox that when the user chose Yes the app gets the current clv index from a label click and then do other stuff but im getting this error
when i try to excute this line
It work fine without the msgbox
Here is the full code
I have a msgbox that when the user chose Yes the app gets the current clv index from a label click and then do other stuff but im getting this error
B4X:
java.lang.ClassCastException: android.app.AlertDialog cannot be cast to android.view.View
at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:68)
at anywheresoftware.b4a.objects.B4XViewWrapper.getParent(B4XViewWrapper.java:165)
at b4a.example3.customlistview._getitemfromview(customlistview.java:408)
at seven.zero.nvp.main$ResumableSub_delete_Click.resume(main.java:976)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:245)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:185)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
at anywheresoftware.b4a.keywords.Common$1.onClick(Common.java:481)
at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:172)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
java.lang.ClassCastException: android.app.AlertDialog cannot be cast to android.view.View
when i try to excute this line
B4X:
Dim index As Int = CLV1.GetItemFromView(Sender)
It work fine without the msgbox
Here is the full code
B4X:
Dim xui As XUI
Dim sf As Object = xui.Msgbox2Async("Delete file?", "", "Yes", "", "No", Null)
Wait For (sf) Msgbox_Result (Result As Int)
If Result = xui.DialogResponse_Positive Then
Dim index As Int = CLV1.GetItemFromView(Sender)
Log(Index)
End If