Hello,
I created a map and I populated it like this:
When I want to retrieve the key value, i do this
but I get this error log:
I read that:
So what's wrong?
I created a map and I populated it like this:
B4X:
map.Put("2016062309343853.jpg", "c:\desktop")
When I want to retrieve the key value, i do this
B4X:
Dim i as int
i = 0
map.GetKeyAt(i)
but I get this error log:
B4X:
java.lang.NumberFormatException: Invalid double: "2016062309343853.jpg"
at java.lang.StringToReal.invalidReal(StringToReal.java:63)
at java.lang.StringToReal.parseDouble(StringToReal.java:269)
at java.lang.Double.parseDouble(Double.java:295)
at it.android.imgspa.and_FotoContainer.svcupload._smb1_listcompleted(svcupload.java:409)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA$3.run(BA.java:320)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5297)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
I read that:
The key should be a string or a number. The value can be any type of object.
So what's wrong?