You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Object does not dispatch NOTIFICATION_POSTINITIALIZE #1269
Well, it's really simple to fix on the godot-cpp side - I think it'd just be adding one line of code. :-)
But what I need to look into is if it's possible/desirable to fix this on the Godot side instead. If we can fix it on the Godot side, then all bindings will be fixed, rather than each having to do their own fix for this issue.
Discussed at the GDExtension meeting, and we favored having the GDExtension bindings dispatching NOTIFICATION_POSTINITIALIZE (rather than having the engine attempt to do it automatically), since there isn't a good place to do it that wouldn't have potential issues. For example, we discussed having Object::set_instance_binding() do it, but developers wouldn't necessarily expect that function to have side effects, and in some language bindings, they might not be finished initializing the object at that point. This does mean that we would need to document that all language bindings need to do this.
It would be helpful to have more feedback from other language binding maintainers, /cc @Bromeon
I guess that makes sense, and I'm fine with the extension dispatching NOTIFICATION_POSTINITIALIZE.
But how do people learn about this? Where would be a good place to document it?
Without seeing this issue, I'd likely never have known this is something we should do 😉
We probably need a "how to create GDExtension bindings" document, but that'll be a tricky thing to start given that there's so much to write and we probably can't get it all in one pass. Maybe it could be a "tips for creating GDExtension bindings" first?
Activity
dsnopek commentedon Oct 14, 2023
Thanks!
I'm not 100% sure if this should be handled on the godot-cpp side or on the Godot side, so this will need some investigation and discussion.
Naros commentedon Oct 14, 2023
That's reasonable, hopefully, it's something we can get into 4.2 :)
Naros commentedon Oct 26, 2023
Hi @dsnopek, I'm curious if you have had a chance to see what the impact/effort is for this?
dsnopek commentedon Oct 26, 2023
Well, it's really simple to fix on the godot-cpp side - I think it'd just be adding one line of code. :-)
But what I need to look into is if it's possible/desirable to fix this on the Godot side instead. If we can fix it on the Godot side, then all bindings will be fixed, rather than each having to do their own fix for this issue.
dsnopek commentedon Nov 16, 2023
Discussed at the GDExtension meeting, and we favored having the GDExtension bindings dispatching
NOTIFICATION_POSTINITIALIZE(rather than having the engine attempt to do it automatically), since there isn't a good place to do it that wouldn't have potential issues. For example, we discussed havingObject::set_instance_binding()do it, but developers wouldn't necessarily expect that function to have side effects, and in some language bindings, they might not be finished initializing the object at that point. This does mean that we would need to document that all language bindings need to do this.It would be helpful to have more feedback from other language binding maintainers, /cc @Bromeon
Bromeon commentedon Nov 19, 2023
I guess that makes sense, and I'm fine with the extension dispatching
NOTIFICATION_POSTINITIALIZE.But how do people learn about this? Where would be a good place to document it?
Without seeing this issue, I'd likely never have known this is something we should do 😉
dsnopek commentedon Nov 19, 2023
We probably need a "how to create GDExtension bindings" document, but that'll be a tricky thing to start given that there's so much to write and we probably can't get it all in one pass. Maybe it could be a "tips for creating GDExtension bindings" first?