From a4a37437b96797e11d9cd8f49c4b8caaa35c976c Mon Sep 17 00:00:00 2001 From: Paperomo <60154085+Paperomo@users.noreply.github.com> Date: Fri, 3 Oct 2025 22:12:29 -0700 Subject: [PATCH 1/6] Update object_class.rst should be updated and working --- engine_details/architecture/object_class.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/engine_details/architecture/object_class.rst b/engine_details/architecture/object_class.rst index ffa69908cbf..b67d8f135f6 100644 --- a/engine_details/architecture/object_class.rst +++ b/engine_details/architecture/object_class.rst @@ -227,12 +227,13 @@ languages). This example shows how to connect to them: .. code-block:: cpp - obj->connect(, target_instance, target_method) - // for example: - obj->connect("enter_tree", this, "_node_entered_tree") + // This is the function signature + // Error connect (const StringName &p_signal, const Callable &p_callable, uint32_t p_flags=0) + // for example + obj->connect("signal_name_here",callable_mp(this, &MyCustomType::method),CONNECT_DEFERRED) -The method ``_node_entered_tree`` must be registered to the class using -``ClassDB::bind_method`` (explained before). +``callable_mp`` is a macro to create a custom callabled function pointer to member functions. +The enum definitions for p_flags are noted at :ref:`ConnectFlags ` Adding signals to a class is done in ``_bind_methods``, using the ``ADD_SIGNAL`` macro, for example: From 4a6177bd44ec56c64381050274ca4e2ca3003eee Mon Sep 17 00:00:00 2001 From: Paperomo <60154085+Paperomo@users.noreply.github.com> Date: Sun, 5 Oct 2025 06:54:09 -0700 Subject: [PATCH 2/6] Update object_class.rst typos --- engine_details/architecture/object_class.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine_details/architecture/object_class.rst b/engine_details/architecture/object_class.rst index b67d8f135f6..c9c168bffe1 100644 --- a/engine_details/architecture/object_class.rst +++ b/engine_details/architecture/object_class.rst @@ -232,7 +232,7 @@ languages). This example shows how to connect to them: // for example obj->connect("signal_name_here",callable_mp(this, &MyCustomType::method),CONNECT_DEFERRED) -``callable_mp`` is a macro to create a custom callabled function pointer to member functions. +``callable_mp`` is a macro to create a custom callable function pointer to member functions. The enum definitions for p_flags are noted at :ref:`ConnectFlags ` Adding signals to a class is done in ``_bind_methods``, using the From a054108ebe0b06f820722cc0177f3f7b1be5b210 Mon Sep 17 00:00:00 2001 From: Paperomo <60154085+Paperomo@users.noreply.github.com> Date: Mon, 6 Oct 2025 13:00:16 -0700 Subject: [PATCH 3/6] Update engine_details/architecture/object_class.rst Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> --- engine_details/architecture/object_class.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine_details/architecture/object_class.rst b/engine_details/architecture/object_class.rst index c9c168bffe1..6a06f78027b 100644 --- a/engine_details/architecture/object_class.rst +++ b/engine_details/architecture/object_class.rst @@ -228,7 +228,7 @@ languages). This example shows how to connect to them: .. code-block:: cpp // This is the function signature - // Error connect (const StringName &p_signal, const Callable &p_callable, uint32_t p_flags=0) + // Error connect(const StringName &p_signal, const Callable &p_callable, uint32_t p_flags = 0) // for example obj->connect("signal_name_here",callable_mp(this, &MyCustomType::method),CONNECT_DEFERRED) From 602fd3747ab6467421b32e422288f0b23acb53e2 Mon Sep 17 00:00:00 2001 From: Paperomo <60154085+Paperomo@users.noreply.github.com> Date: Mon, 6 Oct 2025 13:00:30 -0700 Subject: [PATCH 4/6] Update engine_details/architecture/object_class.rst Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> --- engine_details/architecture/object_class.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine_details/architecture/object_class.rst b/engine_details/architecture/object_class.rst index 6a06f78027b..b8672f5c46d 100644 --- a/engine_details/architecture/object_class.rst +++ b/engine_details/architecture/object_class.rst @@ -230,7 +230,7 @@ languages). This example shows how to connect to them: // This is the function signature // Error connect(const StringName &p_signal, const Callable &p_callable, uint32_t p_flags = 0) // for example - obj->connect("signal_name_here",callable_mp(this, &MyCustomType::method),CONNECT_DEFERRED) + obj->connect("signal_name_here", callable_mp(this, &MyCustomType::method), CONNECT_DEFERRED); ``callable_mp`` is a macro to create a custom callable function pointer to member functions. The enum definitions for p_flags are noted at :ref:`ConnectFlags ` From 545d4b204f1bc43be278886511a854d71060ef39 Mon Sep 17 00:00:00 2001 From: Paperomo <60154085+Paperomo@users.noreply.github.com> Date: Mon, 6 Oct 2025 13:01:12 -0700 Subject: [PATCH 5/6] Update engine_details/architecture/object_class.rst Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> --- engine_details/architecture/object_class.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine_details/architecture/object_class.rst b/engine_details/architecture/object_class.rst index b8672f5c46d..6a4c2f8aa28 100644 --- a/engine_details/architecture/object_class.rst +++ b/engine_details/architecture/object_class.rst @@ -233,7 +233,7 @@ languages). This example shows how to connect to them: obj->connect("signal_name_here", callable_mp(this, &MyCustomType::method), CONNECT_DEFERRED); ``callable_mp`` is a macro to create a custom callable function pointer to member functions. -The enum definitions for p_flags are noted at :ref:`ConnectFlags ` +For the values of ``p_flags``, see :ref:`ConnectFlags `. Adding signals to a class is done in ``_bind_methods``, using the ``ADD_SIGNAL`` macro, for example: From 3657416de358fb651d996fc3ec70bf4be03df291 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 7 Oct 2025 00:36:43 +0200 Subject: [PATCH 6/6] Apply suggestions from code review --- engine_details/architecture/object_class.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine_details/architecture/object_class.rst b/engine_details/architecture/object_class.rst index 6a4c2f8aa28..8ddf73a0788 100644 --- a/engine_details/architecture/object_class.rst +++ b/engine_details/architecture/object_class.rst @@ -227,9 +227,11 @@ languages). This example shows how to connect to them: .. code-block:: cpp - // This is the function signature + // This is the function signature: + // // Error connect(const StringName &p_signal, const Callable &p_callable, uint32_t p_flags = 0) - // for example + // + // For example: obj->connect("signal_name_here", callable_mp(this, &MyCustomType::method), CONNECT_DEFERRED); ``callable_mp`` is a macro to create a custom callable function pointer to member functions.