B4R Question Help with ByteConverter

daveinhull

Active Member
Licensed User
Longtime User
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: Copy
    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?
 
If it works the same way as in B4J then it wants an array passed to it.
Code: Copy
    Dim bytes() As Byte = Array As Byte(1)
    Log(bc.HexFromBytes(bytes))
 
Upvote 1
Back
Top