KeyValueStore Problem

FabioG

Active Member
Licensed User
Longtime User
Hello,

I have a problem using KeyValueStore.

I have this object in my app

B4X:
Type WiFiCfg(SSID As String,WiFiKey As String,EncryptionKey As String,Channel As Int,Interface As String,Metod As Int,DHCPIP As String,DHCPDNS1 As String, DHCPDNS2 As String, ApType As String, Drivers As String)

Dim WiFiCfg1 As WiFiCfg   
WiFiCfg1.Initialize

I have so changed

B4X:
Type WiFiCfg(SSID As String,WiFiKey As String,EncryptionKey As String,Channel As Int,Interface As String,Metod As Int,DHCPIP As String,DHCPDNS1 As String, DHCPDNS2 As String, ApType As String, Drivers As String, InternalDHCP As Boolean)

basically I added this variable

B4X:
InternalDHCP As Boolean

Use this code to recall the settings

B4X:
If File.Exists(File.DirInternal, "Setings.dat") Then   
      SettingsCfg.Initialize(File.DirInternal, "Setings.dat")
      WiFiCfg1 = SettingsCfg.GetObject("WiFiCfg")
      SettingsCfg.Close
End If

I get this error on module KeyValueStore.
B4X:
LastException java.land.illegalArgumentException: invalid value for field
see attached screen

How can I fix?

thanks
Fabio
 

Attachments

  • KeyValueStore-Error.jpg
    KeyValueStore-Error.jpg
    88.7 KB · Views: 156

FabioG

Active Member
Licensed User
Longtime User
If you haven't already, I'd try deleting the previously created KeyValueStore file.

if delete lose all settings.

in other applications can not add the variables in this way.

Someone can help me?

thanks
 
Upvote 0

FabioG

Active Member
Licensed User
Longtime User
There was a bug in the previous update I posted. Please try this one instead.

If you get any error then please post the full error message from the logs.

it works perfectly!

Erel, Thank you very much!
 
Upvote 0
Top