I am working on a project that requires a config field between 0-255 or "None". "0" is a real value. Only "None" means there is no value. How could this be best handled with the current config methods?
Configlist item advice
Started by Huevos, 26 Apr 2017 21:04
10 replies to this topic
Re: Configlist item advice #2
Re: Configlist item advice #3
Re: Configlist item advice #4
Posted 27 April 2017 - 14:35
choicelist = [] for i in range(0, 256): choicelist.append(("%d" % i, _("%d wanted text") % i)) config.test.parameters = ConfigSelection(default = "0", choices = [("None", _("Disabled"))] + choicelist)
Littlesat was faster
Edited by ims, 27 April 2017 - 14:36.
Kdo nic nedělá, nic nezkazí!
Re: Configlist item advice #5
Re: Configlist item advice #6
Re: Configlist item advice #7
Re: Configlist item advice #8
Re: Configlist item advice #9
Re: Configlist item advice #10
Posted 27 April 2017 - 21:17
Like opening a pulldown. I didn't know that either...
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: Configlist item advice #11
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users