Followers 0 Following 0 Joined Last Online
Can I change the value of a variable in a function called by a button?
I tried it like this but it does not work sadly
“ UnboundLocalError: local variable 'x' referenced before assignment”
import ui x = 100 def action1(sender): x -= 1 view = ui.load_view() button = view["button1"] button.action = action1 view.present('sheet')