self.value = self.choices[0]
elif key == KEY_END:
self.value = self.choices[nchoices - 1]
+
+ def selectNext(self):
+ nchoices = len(self.choices)
+ i = self.choices.index(self.value)
+ self.value = self.choices[(i + 1) % nchoices]
def getText(self):
descr = self.description[self.value]
class ConfigLocations(ConfigElement):
def __init__(self, default = [], visible_width = False):
ConfigElement.__init__(self)
+ self.visible_width = visible_width
self.pos = -1
self.default = default
self.locations = []
assert len(args) > 1, "getConfigListEntry needs a minimum of two arguments (descr, configElement)"
return args
+def updateConfigElement(element, newelement):
+ newelement.value = element.value
+ return newelement
+
#def _(x):
# return x
#