B4J Question java.lang.ClassCastException SOLVED

Angelo Messina

Active Member
Licensed User
Longtime User
B4X:
sb.Append("[IsInitialized=true, Years=0, Months=0").Append(CRLF).Append(",Days=0,Hours=18,Minutes=15").Append(CRLF).Append(",Seconds=0]").Append(CRLF)
        Item.Put("Ora",sb.ToString)
        Log(Item)
    End If
    Wait For (PrefDialog.ShowDialog(Item, "OK", "EXIT")) Complete (Result As Int)


java.lang.ClassCastException: class java.lang.String cannot be cast to class b4j.example.dateutils$_period (java.lang.String is in module java.base of loader 'bootstrap'; b4j.example.dateutils$_period is in unnamed module of loader 'app')
 

Angelo Messina

Active Member
Licensed User
Longtime User
PrefDialog.ShowDialog(Item, "OK", "EXIT")) Complete (Result As Int)

Item as Map
{Edit=5, Tipologia=Appuntamento, Descrizione=andare dal medico, Scadenza=1624485600000, Ora=[IsInitialized=true, Years=0,
Months=0,Days=0,Hours=17,Minutes=25,Seconds=0], Note=Nuovo}
 
Last edited:
Upvote 0
Top