Skip to content

Passing additional data to event handlers - rio.Switch #194

Answered by Nachsh
Nachsh asked this question in Q&A
Discussion options

You must be logged in to vote

@Aran-Fey I got some confidence from your answer and I tried again. It works now!
my intake is that I need to place the 'event' last in the call for the 'on_change' function:

call:
on_change=functools.partial(self.on_led_change, curr_led)

func def:
def on_led_change(self, led: Led, event: rio.SwitchChangeEvent ):

Thanks!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Nachsh
Comment options

Answer selected by Nachsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants