Renamed return value from Read call from button to event... EVERYWHERE

This commit is contained in:
MikeTheWatchGuy 2018-10-15 16:07:23 -04:00
parent 43526e0182
commit c79a8772cc
86 changed files with 7992 additions and 12709 deletions

View file

@ -27,11 +27,11 @@ window = sg.Window('Spinner simulation').Layout(layout)
# --- Event Loop --- #
counter = 0
while True:
button, value = window.Read()
event, values = window.Read()
if button == 'Ok' or button is None: # be nice to your user, always have an exit from your form
if event == 'Ok' or event is None: # be nice to your user, always have an exit from your form
break
# --- do spinner stuff --- #
counter += 1 if button =='+' else -1 if button == '-' else 0
counter += 1 if event == '+' else -1 if event == '-' else 0
window.FindElement('spin').Update(counter)