Skip to content

Conversation

@Calinou
Copy link
Member

@Calinou Calinou commented Nov 6, 2025

@Calinou Calinou requested a review from a team as a code owner November 6, 2025 23:30
@Calinou Calinou added enhancement documentation cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Nov 6, 2025
@Calinou Calinou added this to the 4.6 milestone Nov 6, 2025
</constant>
<constant name="CONNECT_PERSIST" value="2" enum="ConnectFlags">
Persisting connections are stored when the object is serialized (such as when using [method PackedScene.pack]). In the editor, connections created through the Node dock are always persisting.
[b]Note:[/b] Connections to lambda functions (i.e. when the function code is embedded in the [method connect] call) cannot be made persistent.
Copy link
Member

@Mickeon Mickeon Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay so, this ambiguity is why I personally adamantly avoid both "e.g." and "i.e.": Because of what "i.e." literally stands for, this note strongly implies that "lambda" functions are when code is embedded in connect(), and that's really the only exception to CONNECT_PERSIST.

We know both statements aren't true, or at least it's quite misleading, so no point explaining it. However, I must note that we're working with "Callables" here, not just "functions".
In fact, what could be worth testing for this purpose is one fire-sure way to determine whether a Callable is a lambda or not.

No suggestion yet, it's late at night.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And maybe you can add this description on the connections page?

Copy link

@moonvent moonvent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thanks for your explanation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release documentation enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants