Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix confusing descriptions of ConfirmationDialog. #92242

Conversation

Daylily-Zeleen
Copy link
Contributor

@Daylily-Zeleen Daylily-Zeleen commented May 22, 2024

The previous code example get_cancel_button().pressed.connect(self.canceled) is confusing, Because canceled is a signal of base class AcceptDialog. Connect a signal to signal is incorrect obviously.

@Daylily-Zeleen Daylily-Zeleen requested a review from a team as a code owner May 22, 2024 07:09
@Daylily-Zeleen Daylily-Zeleen changed the title Fix confusing descriptions of ConfirmationDialog's description. Fix confusing descriptions of ConfirmationDialog. May 22, 2024
@akien-mga akien-mga added this to the 4.3 milestone May 22, 2024
@akien-mga akien-mga added cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels May 22, 2024
[/gdscript]
[csharp]
GetCancelButton().Pressed += Canceled;
GetCancelButton().Pressed += OnCanceled;
Copy link
Member

Choose a reason for hiding this comment

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

CC @godotengine/dotnet to confirm this would be the appropriate name style for a signal callback.

Copy link
Member

Choose a reason for hiding this comment

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

.NET conventions use On* to name methods used to raise events, not for callbacks. But our own documentation already does not follow this convention (e.g. https://docs.godotengine.org/en/latest/tutorials/scripting/c_sharp/c_sharp_signals.html). So I guess it is fine?

@akien-mga akien-mga merged commit 01b804f into godotengine:master May 23, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Daylily-Zeleen Daylily-Zeleen deleted the daylily-zeleen/fix_ConfirmationDialog_doc branch August 31, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release documentation enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants