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_tappedfunction above the
In your script,
button_tappedis not yet defined when
load_viewis called, so the action can't be bound.
@omz thy :3