B4J Question java.lang.ClassNotFoundException: java.lang.b4j.FridayNightPoker.b4xmainpage._scard

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I have a class called cCards that has a type structure called sCARD
Code: Copy
    Type  sCARD(Width As Int, Height As Int, Card As Long, CardBitmap As B4XBitmap)

All the code works fine normally but when I go to debug into some of the routines (this is one of them)
Code: Copy
Public  Sub IsSuitHearts(xCard As Object)  As Boolean
            Dim CheckCard As Int
           
            If  xCard Is sCARD Then
                CheckCard = xCard.As(sCARD).Card
            Else
                CheckCard = xCard
            End If
           
            Return Bit.And(CheckCard, cCARDS_CARDSUIT_HEARTS) = cCARDS_CARDSUIT_HEARTS
End Sub

I get the follow crash when I get to the if xCard is sCARD

I tried moving the Type definition from the cCards class to the b4xmainpage class but still get the crash.

IF I am not stepping into the code everything works perfectly

NOW, days ago this wasn't happening. It just started happening and I cannot figure (other then getting rid of sCARD how to fix it.

BobVal

PS: the crash is happening on the line If xCard Is sCARD Then
 
Back
Top