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)
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 ) )
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 ) ) )
def use(self, clientId): sendToClient(clientId, self.menuStr) pushCmdHandler(clientId, self.menuMap)
def _activate( clientId, textEditor ): pushCmdHandler( clientId, textEditor.cmdMap ) pushPrompt( clientId, lambda clientId: _prompt ) sendToClient( clientId, textEditor.menu )
def _activate(clientId, textEditor): pushCmdHandler(clientId, textEditor.cmdMap) pushPrompt(clientId, lambda clientId: _prompt) sendToClient(clientId, textEditor.menu)
def use( self, clientId ): sendToClient( clientId, self.menuStr ) pushCmdHandler( clientId, self.menuMap )