Exemplo n.º 1
0
    def run(self, funcs):
        UISequencer.funcs = funcs
        aliases = {
            'run%d' % i: Code(UISequencer.runner)
            for i in range(0, len(UISequencer.funcs))
        }

        sequence = {
            'run%d' % i: {
                Symbol('abort'):
                Symbol('abort'),
                Symbol('next'):
                'run%d' % (i + 1) if
                (i + 1) < len(UISequencer.funcs) else Symbol('abort')
            }
            for i in range(0, len(UISequencer.funcs))
        }
        sequence['ws_start'] = 'run0'

        Wizard.CreateDialog()

        ret = Sequencer.Run(aliases, sequence)

        UI.CloseDialog()
        return ret
Exemplo n.º 2
0
 def HasSpecialWidget(symbol):
     return UI.HasSpecialWidget(Symbol(symbol))
Exemplo n.º 3
0
 def SetFocus(ID):
     UI.SetFocus(Term('id', ID))
Exemplo n.º 4
0
 def ReplaceWidget(ID, contents):
     UI.ReplaceWidget(Term('id', ID), contents)
Exemplo n.º 5
0
 def QueryWidget(ID, symbol):
     return UI.QueryWidget(Term('id', ID), Symbol(symbol))
Exemplo n.º 6
0
 def UserInput():
     while True:
         yield UI.UserInput()
Exemplo n.º 7
0
 def CloseDialog():
     UI.CloseDialog()
Exemplo n.º 8
0
 def OpenDialog(contents):
     UI.OpenDialog(contents)