From 3315c0b4adb7be20252ecb90fd443580334981e0 Mon Sep 17 00:00:00 2001 From: Andreas Just Date: Wed, 29 Jul 2026 09:26:01 +0200 Subject: [PATCH] Fix Invoke message defaults --- bindings/app/Invoker.cpp | 2 +- bindings/interface/Button.cpp | 2 +- tests/invokeMessageDefault.py | 90 +++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 tests/invokeMessageDefault.py diff --git a/bindings/app/Invoker.cpp b/bindings/app/Invoker.cpp index c18ca03..0314215 100644 --- a/bindings/app/Invoker.cpp +++ b/bindings/app/Invoker.cpp @@ -211,7 +211,7 @@ If message is ``None`` the default message is sent instead. :type message: BMessage :return: ``B_OK`` if the message was sent, ``B_BAD_VALUE`` for no default message, and no message argument, other error forwarded from BMessenger::SendMessage(). :rtype: int -)doc", py::arg("message")=NULL) +)doc", py::arg("message")=py::none()) .def("InvokeNotify", &BInvoker::InvokeNotify, R"doc( Send the message to its target, using the notification code specified by kind. If message is ``None``, no message is sent to the target, but any watchers of the diff --git a/bindings/interface/Button.cpp b/bindings/interface/Button.cpp index ea64632..b1cae8a 100644 --- a/bindings/interface/Button.cpp +++ b/bindings/interface/Button.cpp @@ -135,7 +135,7 @@ py::class_