Skip to content

Commit 875fff3

Browse files
committed
Merge pull request godotengine#112642 from KoBeWi/multiple_levels_of_wrong
Clarify notification call order
2 parents 8327dfa + 1be1bd1 commit 875fff3

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

doc/classes/CanvasItem.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@
753753
</constant>
754754
<constant name="NOTIFICATION_EXIT_CANVAS" value="33">
755755
The [CanvasItem] has exited the canvas.
756+
This notification is sent in reversed order.
756757
</constant>
757758
<constant name="NOTIFICATION_WORLD_2D_CHANGED" value="36">
758759
Notification received when this [CanvasItem] is registered to a new [World2D] (see [method get_world_2d]).

doc/classes/Control.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,7 @@
12871287
</constant>
12881288
<constant name="NOTIFICATION_FOCUS_EXIT" value="44">
12891289
Sent when the node loses focus.
1290+
This notification is sent in reversed order.
12901291
</constant>
12911292
<constant name="NOTIFICATION_THEME_CHANGED" value="45">
12921293
Sent when the node needs to refresh its theme items. This happens in one of the following cases:

doc/classes/Node.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,7 @@
11651165
<constant name="NOTIFICATION_EXIT_TREE" value="11">
11661166
Notification received when the node is about to exit a [SceneTree]. See [method _exit_tree].
11671167
This notification is received [i]after[/i] the related [signal tree_exiting] signal.
1168+
This notification is sent in reversed order.
11681169
</constant>
11691170
<constant name="NOTIFICATION_MOVED_IN_PARENT" value="12" deprecated="This notification is no longer sent by the engine. Use [constant NOTIFICATION_CHILD_ORDER_CHANGED] instead.">
11701171
</constant>

doc/classes/Node3D.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@
380380
</constant>
381381
<constant name="NOTIFICATION_EXIT_WORLD" value="42">
382382
Notification received when this node is unregistered from the current [World3D] (see [method get_world_3d]).
383+
This notification is sent in reversed order.
383384
</constant>
384385
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43">
385386
Notification received when this node's visibility changes (see [member visible] and [method is_visible_in_tree]).

doc/classes/Object.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
[/csharp]
268268
[/codeblocks]
269269
[b]Note:[/b] The base [Object] defines a few notifications ([constant NOTIFICATION_POSTINITIALIZE] and [constant NOTIFICATION_PREDELETE]). Inheriting classes such as [Node] define a lot more notifications, which are also received by this method.
270-
[b]Note:[/b] Unlike other virtual methods, this method is called automatically for every script that overrides it. This means that the base implementation should not be called via [code]super[/code] in GDScript or its equivalents in other languages. The bottom-most sub-class will be called first, with subsequent calls ascending the class hierarchy.
270+
[b]Note:[/b] Unlike other virtual methods, this method is called automatically for every script that overrides it. This means that the base implementation should not be called via [code]super[/code] in GDScript or its equivalents in other languages. Call order depends on the [code]reversed[/code] argument of [method notification] and varies between different notifications. Most notifications are sent in the forward order (i.e. Object class first, most derived class last).
271271
</description>
272272
</method>
273273
<method name="_property_can_revert" qualifiers="virtual">
@@ -1031,6 +1031,7 @@
10311031
</constant>
10321032
<constant name="NOTIFICATION_PREDELETE" value="1">
10331033
Notification received when the object is about to be deleted. Can be used like destructors in object-oriented programming languages.
1034+
This notification is sent in reversed order.
10341035
</constant>
10351036
<constant name="NOTIFICATION_EXTENSION_RELOADED" value="2">
10361037
Notification received when the object finishes hot reloading. This notification is only sent for extensions classes and derived.

0 commit comments

Comments
 (0)