Skip to content

Commit

Permalink
Update Settings Class Module
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Jun 26, 2016
1 parent 48bcb20 commit 99fe9fe
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 165 deletions.
23 changes: 19 additions & 4 deletions I-Nex/i-nex/.src/Main.module
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,38 @@
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.


Public Sub Main()

Dim hSettings As Settings
Dim sSlot As String
Dim sKey As String

hSettings = New Settings("~/.i-nex/i-nex.conf")

hSettings["localhost/Login"] = ""
hSettings["Charlie/Login"] = "Toto"
Dump(hSettings)
hSettings.Save()
' clear and save it
hSettings.Clear("Charlie") ' don't work, found, removed
Dump(hSettings)
hSettings.Save() ' on save reloaded by "Sub Load()" from file

End

Private Sub Dump(hSettings As Settings)

Dim sSlot As String
Dim sKey As String

For Each sSlot In hSettings.Keys

Print "["; sSlot; "]"
For Each sKey In hSettings.Keys[sSlot]
Print sKey
Print sKey; "="; hSettings[sSlot &/ sKey]
Next

Next

Print

End

0 comments on commit 99fe9fe

Please sign in to comment.