Open caoimhebyrne opened 2 years ago
When defining a selector like shown below, once it's defined, the list of options stays the same, even if it's changed later on.
val options = listOf("1", "2", "3") init { selector( ::foo, "Foo", "Bar", options = options ) ... }
It might be a good idea to be able to update a selector's list, as I can think of many cases where a data set may change over time.
One solution is passing options by a field reference, and then checking that field each time the configuration GUI is shown:
options
selector( ... options = ::options )
This is open to suggestion, and I'd like to see what other people think is a viable solution to this problem.
When defining a selector like shown below, once it's defined, the list of options stays the same, even if it's changed later on.
It might be a good idea to be able to update a selector's list, as I can think of many cases where a data set may change over time.
One solution is passing
options
by a field reference, and then checking that field each time the configuration GUI is shown:This is open to suggestion, and I'd like to see what other people think is a viable solution to this problem.