Response¶
-
class
rumps.rumps.
Response
(clicked, text)¶ Holds information from user interaction with a
rumps.Window
after it has been closed.-
clicked
¶ Return a number representing the button pressed by the user.
The “ok” button will return
1
and the “cancel” button will return0
. This makes it convenient to write a conditional like,if response.clicked: do_thing_for_ok_pressed() else: do_thing_for_cancel_pressed()
Where response is an instance of
rumps.rumps.Response
.Additional buttons added using methods
rumps.Window.add_button()
andrumps.Window.add_buttons()
will return2
,3
, ... in the order they were added.
-
text
¶ Return the text collected from the user.
-