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.
Just a simple button :(
-
Please help, i am trying to make a SIMPLE Button and i am really new to python and pythonista.
I already made a simple pyui File with JUST a simple Button in the center (no name, i just added "button_tapped" as action). But consoles only message is: "Cannot bind action: 'button_tapped is not definied'
# coding: utf-8 import ui import console v = ui.load_view() v.present('sheet') # As a function: def button_tapped(sender): print 'button tapped'
-
You're almost there. Just move the
button_tapped
function above theload_view
call.In your script,
button_tapped
is not yet defined whenload_view
is called, so the action can't be bound. -
@omz thy :3