ComboBox filled from CSV issue.

Hi all,

Over the last few months you helped me several times to solve issues I didn’t know how to fix or write. At the moment I got another issue and again, I don’t know how to fix/write it. Hope you guys can help me out again. It’s highly appreciated.

The problem:

I have a combobox that I like to fill from a .csv file (ARMG_Spreaders.csv), but I only want to show the spreaders that are marked as Used “NO” in the .csv file. If the script/GUI is running it works fine, but once I start or refresh it, the combobox loses the selected item and marked the last Spreader as Used “YES” and the one that was selected as Used “NO”, ending in showing up no selected item in the combobox. (I can make a new choice, but the one made before the refresh is gone)

Also I noticed the script to modify the .csv files once it started or being refreshed.

I pasted the script, Functions, Variables and example parts of the files in here https://pastebin.com/rE3i0W3k

I’m hoping for another set of eyes to find my mistake(s) and to explain why the script acts this way. I can imagine the chaos my script looks like for someone who’s looking from the outside, apologies in advance for that.

submitted by /u/UnusualScripting
[link] [comments]

Leave a Reply