-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
If you try this code and click on the notification:
win11toast.toast(
title="Bug",
on_click=lambda x: print("Toast clicked!")
)
You get the following exception:
Traceback (most recent call last):
File "C:\Users\<path-to-file>\.venv\Lib\site-packages\win11toast.py", line 366, in <lambda>
activated_future.set_result, on_click(activated_args(*args))
File "C:\Users\<path-to-file>\.venv\Lib\site-packages\win11toast.py", line 169, in activated_args
e.user_input[name]).get_string()) for name in e.user_input()])
TypeError: 'winrt._winrt_windows_foundation_collections.ValueSet' object is not callable
However, if you remove the brackets after the e.user_input variable in line 169 like this:
user_input = dict([(name, IPropertyValue._from(
e.user_input[name]).get_string()) for name in e.user_input])
Then both the string version and the lambda version work.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels