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

Default arguments in signals #88

Open
vonagam opened this issue Apr 22, 2021 · 2 comments
Open

Default arguments in signals #88

vonagam opened this issue Apr 22, 2021 · 2 comments
Labels

Comments

@vonagam
Copy link
Contributor

vonagam commented Apr 22, 2021

There are default_args, num_default_args in godot_signal and default_value in godot_signal_argument.

Based on source code for godot_nativescript_register_signal (link to master, there are no changes to relevant part in question since third version) seems like default_args are not used. Instead a number of num_default_args default_values is collected from the start of args for use as defaults.

So seems like either default_args or default_value should be removed.

It seems wrong that default values are collected from the start and not the end of args.

And usage property in godot_signal_argument seems meaningless (it is absent from godot_method_arg for example).

@akien-mga akien-mga added the bug label Sep 27, 2021
@ParadoxV5
Copy link

Excuse me for necroposting, but a quick update: While these args are still present on 3.5 and 3.x, the overhauled 4.0 GDExtension header (#107) does not expose them and whether they’re still present in the source code (I couldn’t search it) is not us header users’ concern.

@vonagam
Copy link
Contributor Author

vonagam commented May 1, 2023

I don't think it is necroposting as it is one of few open issues here. And as I understand until your PR is merged it is still valid one. After that, I guess, it can be close as I don't see default_args in json of your PR.

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

No branches or pull requests

3 participants