Jump to content


Photo

Configlist item advice


  • Please log in to reply
10 replies to this topic

#1 Huevos

  • PLi® Contributor
  • 4,247 posts

+158
Excellent

Posted 26 April 2017 - 21:04

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?



Re: Configlist item advice #2 Huevos

  • PLi® Contributor
  • 4,247 posts

+158
Excellent

Posted 27 April 2017 - 14:13

So no one knows how to deal with this?



Re: Configlist item advice #3 littlesat

  • PLi® Core member
  • 56,271 posts

+691
Excellent

Posted 27 April 2017 - 14:27

Make a list like this [(None, _("Off"))] + list(x for x in range(0,256))

Edited by littlesat, 27 April 2017 - 14:28.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Configlist item advice #4 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

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 Huevos

  • PLi® Contributor
  • 4,247 posts

+158
Excellent

Posted 27 April 2017 - 19:30

Thanks for the replies. I know how ConfigSelection works. You are missing the point of the question. Having to scroll through a big list of numbers is not practical. I am looking for a way to do this that is user friendly.



Re: Configlist item advice #6 littlesat

  • PLi® Core member
  • 56,271 posts

+691
Excellent

Posted 27 April 2017 - 20:15

That is why you can press the videobutton or list button on such field.... You just have to know this...

Edited by littlesat, 27 April 2017 - 20:15.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Configlist item advice #7 Huevos

  • PLi® Contributor
  • 4,247 posts

+158
Excellent

Posted 27 April 2017 - 21:09

That is why you can press the videobutton or list button on such field.... You just have to know this...

???. How is scrolling up/down any faster than scrolling left/right?

 

Edit: OK I get it.


Edited by Huevos, 27 April 2017 - 21:11.


Re: Configlist item advice #8 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 27 April 2017 - 21:14

Interesting. Didn't know that.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Configlist item advice #9 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

Posted 27 April 2017 - 21:14

left/right in opened list = pg up/dn ... much faster


Kdo nic nedělá, nic nezkazí!

Re: Configlist item advice #10 WanWizard

  • PLi® Core member
  • 68,588 posts

+1,738
Excellent

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 Huevos

  • PLi® Contributor
  • 4,247 posts

+158
Excellent

Posted 27 April 2017 - 21:17

BTW, Can you enter a negative integer value in a ConfigInteger field?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users