I started to use the StateManager. After downloading it and unzipping it, I copied StateManager.bas into my project where the other .bas files were located. I added it into the project as an existing module and it showed up as a tab so I could see the coding of the module. When I tried to save the project I got an error on the If statement. Is this module incomplete?
This is the If statement that gave the error:
B4X:
If Settings.IsInitialized = False Then
This is the Sub that has the If statement:
B4X:
Sub GetSetting2(Key As String, DefaultValue As String)
If Settings.IsInitialized = False Then
'load the stored settings
If File.Exists(File.DirInternal, settingsFileName) Then
Settings = File.ReadMap(File.DirInternal, settingsFileName)
Else
Return DefaultValue
End If
End If
Dim v As String
v = Settings.GetDefault(Key.ToLowerCase, DefaultValue)
Return v
End Sub