android - qpython kivy textinput and display -


using qpython , kivy on android phone, i'm trying write program inputs text, processes , shows output.

from kivy.app import app kivy.uix.button import button kivy.uix.textinput import textinput  class testapp(app):     def build(self)         r = textinput(multiline=false).text         y = self.dosomething(r)         return button(text = y)      def dosomething(self, x):         y = x + ' something'         return y  testapp().run 

this fails - when push run doesn't ask input , display 'something'.

how fix can text input user?

edit replace build with:

def build(self):    def cb(instance, value):       print(value)    r = textinput(focus=true, multiline=false)    r.bind(text=cb)    return r 


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -