#Troubles with .INI editing on Windows Forms
42 messages · Page 1 of 1 (latest)
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
i have deadline in 6 hours
Do you write the .ini back to disk?
Also love the cursing in code, literally me
you write this to the file
For creating I assume
Then in the delete button handler you never actually save the ini file back to disk
yeah, but i just need just a working code, things like this currently is not matter
Why would the file update if you never update the actual file on disk?
im updating file on folder, cuz its faster for me. ill rewrite this a bit later
OH
wait
I believe the DeleteKey takes in a section and a key, not sure how much that matters here
But to me it looks like you never save the updated file (with the deleted entry removed)
no, DeleteKey deleteing the key obviously, DeleteSection deletes whole section. i used DeleteSection for clearing list
damn
I guess I looked at the wrong docs then 😂
!
lemme try ig
but currently im thinking the problem is variable. i tried all vars here (FUCK.SelectedItems, FUCK.SelectedItems[i], i) and no one working
Do you ever save back the modified IniFile?
it doesnt needs to be saved, it automatically writes changes to ini, if i understand you right
im using this ini code https://stackoverflow.com/questions/217902/reading-writing-an-ini-file
Yeah let me pull up the docs real quick
Are you using this library? https://github.com/JeevanJames/IniFile
nope
Oh sorry I didn't see the SO post includes a IniFile wrapper
It looks like DeleteKey expects you to provide the key and an optional section
Have you tried passing in the correct section string as well?
you mean paste the section too?