D daveinhull Active Member Licensed User Longtime User Dec 1, 2023 #1 Hello and sorry for all the help requests - must be getting old! I'm getting an error when trying to use ByteConverter which has never happened before, and I just can't see what I'm doing wrong: B4X: Log (bc.HexFromBytes(1)) gives an eror Main - 205: Cannot cast type: {Type=Int,Rank=0, RemoteObject=False} to: {Type=Byte,Rank=1, RemoteObject=True} In fact all conversion types give the same error. Could somone show me the wood for the trees?
Hello and sorry for all the help requests - must be getting old! I'm getting an error when trying to use ByteConverter which has never happened before, and I just can't see what I'm doing wrong: B4X: Log (bc.HexFromBytes(1)) gives an eror Main - 205: Cannot cast type: {Type=Int,Rank=0, RemoteObject=False} to: {Type=Byte,Rank=1, RemoteObject=True} In fact all conversion types give the same error. Could somone show me the wood for the trees?
Daestrum Expert Licensed User Longtime User Dec 1, 2023 #2 If it works the same way as in B4J then it wants an array passed to it. B4X: Dim bytes() As Byte = Array As Byte(1) Log(bc.HexFromBytes(bytes)) Upvote 1
If it works the same way as in B4J then it wants an array passed to it. B4X: Dim bytes() As Byte = Array As Byte(1) Log(bc.HexFromBytes(bytes))
D daveinhull Active Member Licensed User Longtime User Dec 1, 2023 #3 Many thanks @Daestrum , couldn't see for looking Upvote 0