### List to keep settings

Example of using a list to read, update and save settings to a text file located in the dirapp folder.
File settings.txt
true
false
true
B4J Code
`Sub Process_Globals
...
Private settingslist As List
End Sub`
`Sub AppStart (Form1 As Form, Args() As String)
...
AppInit
...
End Sub`
`Sub AppInit
ReadSettings
'Example to update the second item - note the list index starts at 0
UpdateSetting(1, True)
SaveSettings
ListSettings
End Sub`
`Sub ReadSettings
settingslist = File.ReadList(File.dirapp,"port.ini")
End Sub`
`Sub UpdateSetting(idx As Int, value As Boolean)
settingslist.Set(idx, value)
End Sub`
`Sub SaveSettings
File.WriteList(File.dirapp,"port.ini", settingslist)
End Sub`

Changed: , Category: Lists, File: T6C215M1572.htm, ID: 1572