omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Can textview show a str and var together?

    Pythonista
    2
    3
    1617
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • apselon
      apselon last edited by

      from ui import *
      import ui
      x = 5
      def paper(sender):
      	label = sender.superview['textview1']
      	label.text = 'ggg',x
      ui.load_view('script').present('sheet')
      

      Typeerror: Expected a string
      P.S. sory for my English

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by

        Try 'ggg' + str(x) instead of 'ggg', x.

        1 Reply Last reply Reply Quote 0
        • apselon
          apselon last edited by

          Thank you

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors