Between B4J server and B4A client, I can put a custom Type defined variable inside of a Map to be sent to the B4A App and it works fine as far as I can tell.
But if I try to do the same thing to a B4J websocket client, I get this error:
Here is what I am doing:
ScoreData is my customtype. any ideas?
But if I try to do the same thing to a B4J websocket client, I get this error:
B4X:
TextMessage Error: (ClassCastException) java.lang.ClassCastException: java.lang.String cannot be cast to md.vscb3000wrestling.main$_scoredata
Here is what I am doing:
B4X:
Type ScoreData(RedScore As Int, GreenScore As Int, Period As Int, Minutes As Int, Seconds As Int, Milliseconds As Int)
Public Scores As ScoreData
Scores.Initialize
<code that manipulates info in scores>
Then eventually:
Dim data As Map
Dim SendData As List
SendData.Initialize
data.Initialize
data.Put("Scores", ScoreEngine.Scores) 'Insert Score Data to transmit
SendData.Add(data)
ws.RunFunction("RefreshDisplayScores", SendData)
ws.Flush
ScoreData is my customtype. any ideas?
Last edited: