Skip to content

Update postinit handling #1211

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

beicause
Copy link

@beicause beicause commented Jun 20, 2025

Changes:

  • classdb_construct_object -> classdb_construct_object2
  • string_new_with_utf8_chars_and_len -> string_new_with_utf8_chars_and_len2

After this PR, NOTIFICATION_POSTINITIALIZE will be sent after init() and can be received correctly in on_notification() in godot 4.4 or later. See also test_notifications in the itest.

Partially addresses #557

@beicause beicause force-pushed the update-postinit branch 4 times, most recently from ba02ea9 to 0812e49 Compare June 20, 2025 20:28
@Bromeon
Copy link
Member

Bromeon commented Jun 20, 2025

Thanks!

Changes:

  • classdb_construct_object -> classdb_construct_object2
  • string_new_with_utf8_chars_and_len -> string_new_with_utf8_chars_and_len2

There are many more changes than these two. Please edit your initial description to elaborate what exactly the PR does and its motivation.

Follow-up to #1208.

@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1211

@beicause
Copy link
Author

I'm relatively new to gdext. It seems that we can't modify the object itself (e.g.add_child) within the init function, so issue godotengine/godot#91023 does not occur in gdext ?

`NOTIFICATION_POSTINITIALIZE` will be recevied correctly in godot 4.4 and later
@Bromeon
Copy link
Member

Bromeon commented Jun 21, 2025

Part of that is what I'm looking into in #557.

This PR seems to integrate with Godot's own POST_INIT notification. Can you demonstrate what it enables with some code examples?

Please edit the initial post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants