-from enigma import *
from Screens.Screen import Screen
-from Screens.MessageBox import MessageBox
from Components.ActionMap import NumberActionMap
from Components.Label import Label
-from Components.MenuList import MenuList
-from Components.GUIComponent import *
from Components.ChoiceList import ChoiceEntryComponent, ChoiceList
-import os
-
class ChoiceBox(Screen):
def __init__(self, session, title = "", list = [], keys = None, selection = 0):
Screen.__init__(self, session)
# runs the current selected entry
def go(self):
- self.goEntry(self["list"].l.getCurrentSelection()[0])
+ cursel = self["list"].l.getCurrentSelection()
+ if cursel:
+ self.goEntry(cursel[0])
+ else:
+ self.cancel()
# runs a specific entry
def goEntry(self, entry):