Exemplo n.º 1
0
 def activate(self, clientId):
     """
     convenience function. pushes menu cmdMap and prompt, and displays menu
     """
     pushCmdHandler(clientId, self.cmdMap)
     pushPrompt(clientId, lambda x: self.prompt)
     sendToClient(clientId, self.menu)
Exemplo n.º 2
0
 def activate( self, clientId ):
     """
     convenience function. pushes menu cmdMap and prompt, and displays menu
     """
     pushCmdHandler( clientId, self.cmdMap )
     pushPrompt( clientId, lambda x: self.prompt )
     sendToClient( clientId, self.menu( clientId ) )
Exemplo n.º 3
0
def getOneLine( clientId, submitCallback ):
    """
    activates a text input widget for clientId, which returns one line of text

    submitCallback: func( clientId, text )
    """
    
    assert isInt( clientId )
    assert isFunc( submitCallback)

    pushCmdHandler( clientId, CmdMap( lambda x, remaining: _submitText( x, submitCallback, remaining ) ) )
Exemplo n.º 4
0
 def use(self, clientId):
     sendToClient(clientId, self.menuStr)
     pushCmdHandler(clientId, self.menuMap)
Exemplo n.º 5
0
def _activate( clientId, textEditor ):
    pushCmdHandler( clientId, textEditor.cmdMap )
    pushPrompt( clientId, lambda clientId: _prompt )
    sendToClient( clientId, textEditor.menu )
Exemplo n.º 6
0
def _activate(clientId, textEditor):
    pushCmdHandler(clientId, textEditor.cmdMap)
    pushPrompt(clientId, lambda clientId: _prompt)
    sendToClient(clientId, textEditor.menu)
Exemplo n.º 7
0
 def use( self, clientId ):
     sendToClient( clientId, self.menuStr )
     pushCmdHandler( clientId, self.menuMap )