bmx-ng / text.mod

Text Utilities
0 stars 3 forks source link

[Text.Ini] SetName() not working for sections or properties #20

Closed thareh closed 1 year ago

thareh commented 1 year ago

Good evening,

It seems SetName() is not working properly for both sections and properties.

Framework BRL.Blitz
Import BRL.StandardIO
Import Text.Ini

Local ini:TIni = TIni.Load("Config.ini")

If Not ini
    Throw "Unable to load ini file"
EndIf

Local is:TIniSection = ini.FindSection("system")

If Not is
    Throw "Unable to find ini section"
EndIf

Print is.GetName()
is.SetName("testing")
Print is.GetName()

Local ip:TIniProperty = is.FindProperty("foo")

If Not ip
    Throw "Unable to find ini property"
EndIf

Print ip.GetName()
ip.SetName("testing")
Print ip.GetName()

Print ip.GetValue()
ip.SetValue("testing")
Print ip.GetValue()

Config.ini

[system]
foo=test1

Thanks!