[Gambas-user] Problem savins settings
Antonio Teixeira
antonio.j.teixeira at gmail.com
Fri Dec 22 13:29:29 CET 2023
Hi everyone,
I am using gb.settings to set the network configuration to an application.
I can read the conf file without any kind of problem but later when I
change the values the write or save don't do anything.
I am posting the code and asking for some help.
Thank you in advance.
'Declarations
Private ConfFile As Settings
Private NetworkConfig As New Collection
' Reading the file
Private Sub LoadNetWorkConfig()
Dim sSlot, sKey As String
Dim dummb As String
ConfFile = New Settings("/home/pi/Documents/network.conf", "network")
For Each sSlot In ConfFile.Keys
For Each sKey In ConfFile.Keys[sSlot]
NetworkConfig.Add(ConfFile[sSlot & "/" & sKey, dummb], sSlot & "/" &
sKey)
Next
Next
End
'trying to save
Public Sub Apply_Click()
NetworkConfig["WLAN0/PASSWORD"] = "6934"
ConfFile.Write(NetworkConfig)
End
Atentamente / Regards
António Teixeira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231222/40139336/attachment.htm>
More information about the User
mailing list