I am trying to put into a map a key/value pair for which the key is of type string and the value is of type Big Integer (from the Big Numbers library v.1.00):
B4X:
dim m as map
dim bi as BigInteger
m.Initialize
m.clear
bi.Initialize("12")
m.put("3", bi)
Android complains at runtime: "Object should first be initialized: Big Integer". But obviously, bi has been initialized (the debugger confirms this). The documentation for "map" says that the value in the key/value pair can be any object. A Big Integer is an object. What do I need to do in order to make it work?
To me, this seems to be a bug, but I can't say whether it's in the map routines or in the Big Integers library. I have, for now, resorted to putting the string representation of the big integer into the map (just as you suggested), but that's also a performance penalty since I am invoking "ToString" quite a number of times.