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.


    UI: could not bind action, button name not defined.

    Pythonista
    3
    4
    4497
    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.
    • wiley
      wiley last edited by

      Howdy! I’m a beginner fooling around with the ui module. I’ve created a pyui layout in the editor, and set my button actions to functions in my python script, but I’m getting an error that the button names aren’t defined? Isn’t that supposed to be happening in the pyui file?

      Here’s a link to my project if anyone has time to make a suggestion.
      https://github.com/weevil/adventurers_guild

      The relevant files are guild-ios.py and guild-ios.pyui

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

        I think you'll need to place the nextButton function above the load_view call, but there might be other issues that I'm not seeing right now.

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

          • Do what Ole wrote.
          • Do the same thing for the saveButton.
          • Both functions (saveButton, nextButton) should have one argument.
          • Either rename saveButton function to save or change save action to saveButton in your .pyui file.

          Then it will work. Except other issues like accessing local variable seed before assignment, etc. But these errors are not Pythonista related.

          1 Reply Last reply Reply Quote 1
          • wiley
            wiley last edited by

            Thanks, that did it!

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