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

Core: disabled method bindings that were not compatible with the new system #43311

Closed
4 tasks done
akien-mga opened this issue Nov 4, 2020 · 5 comments
Closed
4 tasks done

Comments

@akien-mga
Copy link
Member

akien-mga commented Nov 4, 2020

Godot version:
master (424cd00)

Issue description:
#42780 changed and greatly simplified the binding system for the core API, but some problematic methods were lost in the process, as seen in #43310.

This issue lists them so that we can evaluate if they can be changed to be bound again, or if they should be dropped fully.

The above comments come from core/variant_call.cpp, which is where core methods are bound.

@aaronfranke
Copy link
Member

aaronfranke commented Nov 4, 2020

I think String.erase() should just be removed. You can already get an empty string in GDScript using String().

For Color.from_hsv(), however we bind it, we should consider changing Color8 and ColorN to be the same way.

@akien-mga
Copy link
Member Author

I think String.erase() should just be removed. You can already get an empty string in GDScript using String().

That's not what it does though, it's void erase(int p_pos, int p_chars); - it removes a substring from the string.

@theoway
Copy link
Contributor

theoway commented Nov 6, 2020

I think String.erase() should just be removed. You can already get an empty string in GDScript using String().

That's not what it does though, it's void erase(int p_pos, int p_chars); - it removes a substring from the string.

#37918. We've had a discussion about this method as it goes against the point of String being immutable. We've thought of removing this method and implementing something similar to splice() as in Javascript, while making sure that String remains immutable. You can drop your suggestions on the issue mentioned above :)

@vnen
Copy link
Member

vnen commented Mar 16, 2021

Now that #46378 is merged, String.humanize_size() is bound. We can move Color.from_hsv() to be static too. Probably the same can be done with Quat if the constructor isn't possible.

@akien-mga
Copy link
Member Author

All fixed in 1aa3c84.

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

No branches or pull requests

4 participants