Hello guys, hope all of you are doing great!!
I am a new user of B4i and I have a question regarding how to use INI files (if there's any chance) in IOS...I have a code that I am using in b4a but I cannot find a way to do the same in b4i, I really appreciate your help or guidance with this issue...
Thanks in advance,
code:
Sub WriteIni(mykey As String,myvalue As String,fPath As String,filename As String)
Dim Map1 As Map
Map1.Initialize
If File.Exists(fPath,filename) Then
Else
File.WriteMap(fPath, filename, Map1) 'to create it if not exist
End If
Map1 = File.ReadMap(fPath,filename)
Map1.Put(mykey, myvalue)
File.WriteMap(fPath, filename, Map1)
End Sub
'--------------------------------------------------------------------
Sub ReadIni(key As String,fPath As String,filename As String)
Dim Map1 As Map
Map1 = File.ReadMap(fPath,filename)
For i = 0 To Map1.Size - 1
If Map1.GetKeyAt(i) = key Then
Return Map1.GetValueAt(i)
End If
Next
End Sub
I am a new user of B4i and I have a question regarding how to use INI files (if there's any chance) in IOS...I have a code that I am using in b4a but I cannot find a way to do the same in b4i, I really appreciate your help or guidance with this issue...
Thanks in advance,
code:
Sub WriteIni(mykey As String,myvalue As String,fPath As String,filename As String)
Dim Map1 As Map
Map1.Initialize
If File.Exists(fPath,filename) Then
Else
File.WriteMap(fPath, filename, Map1) 'to create it if not exist
End If
Map1 = File.ReadMap(fPath,filename)
Map1.Put(mykey, myvalue)
File.WriteMap(fPath, filename, Map1)
End Sub
'--------------------------------------------------------------------
Sub ReadIni(key As String,fPath As String,filename As String)
Dim Map1 As Map
Map1 = File.ReadMap(fPath,filename)
For i = 0 To Map1.Size - 1
If Map1.GetKeyAt(i) = key Then
Return Map1.GetValueAt(i)
End If
Next
End Sub