No, not at this time. The parser preserves empty lines so if you add a new key it will naturally add your new key after the last empty line.
I'll admit that it can look a little ugly. I suppose that with a future version to beautify the code that I could append new keys before empty lines rather than after.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It takes an additional 3 lines of code to make Nini work the way described above.
Granted, all whitespace is ignored (except for a single line after every section), but if you want the separation that badly, I think it would make more sense to just make another section.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using Nini.dll in an application and have the same request. Has anyone ever implemented this? I know it is just for beautification purposes, but still it is desirable.
Thank you for any help or insight on what I can modify to accomplish this.
Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
well, here is my ini:
[sectionA]
key1=value1
key2=value2
[sectionB]
someKey=someValue
then I set a non-exist key to sectionA:
config.set("key3", "value3")
becomes:
[sectionA]
key1=value1
key2=value2
key3=value3
[sectionB]
someKey=someValue
where is my blank line?
sorry, it becomes:
[sectionA]
key1=value1
key2=value2
key3=value3
[sectionB]
someKey=someValue
but still, it is not so satisfactory, I want it like this:
[sectionA]
key1=value1
key2=value2
key3=value3
[sectionB]
someKey=someValue
could it be done through Nini?
No, not at this time. The parser preserves empty lines so if you add a new key it will naturally add your new key after the last empty line.
I'll admit that it can look a little ugly. I suppose that with a future version to beautify the code that I could append new keys before empty lines rather than after.
I think that it is not difficult to implement:)
I would like to see that too =)
It takes an additional 3 lines of code to make Nini work the way described above.
Granted, all whitespace is ignored (except for a single line after every section), but if you want the separation that badly, I think it would make more sense to just make another section.
I am using Nini.dll in an application and have the same request. Has anyone ever implemented this? I know it is just for beautification purposes, but still it is desirable.
Thank you for any help or insight on what I can modify to accomplish this.
Thank you.