iOS Question [B4X] B4XPreferencesDialog AddBooleanItem

Alessandro71

Well-Known Member
Licensed User
Longtime User
I have some B4X code that is working fine in B4A but is showing a different behavior in B4i

prefdialog.AddBooleanItem("Simulation", "Simulate connection")

in the map "Simulation" key equal to integer 1 (while on B4A equals to True, given the lack of proper Boolean type on iOS)
but when the prefdialog is opened in iOS, the boolean switch is shown as "off"
if I switch it to "on", subsequent openings of the dialog will correctly show it as "on", but the map is still set to 1 as in the first call, which showed "off"
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
I suspect this could be caused by the Map being saved and reloaded without using B4XSerializator, and converted to string in the process...
I'll work on that
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
I confirm: reason was using File.WriteMap/ReadMap on the options Map.
I switched to saving with B4XSerializator and the issue was solved.
 
Upvote 0
Top