Comments (2)
According to the documentation for bind():
When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.
So the order in this example actually needs to be callable = callable.bind([]).bind(1)
.
However, it looks like there may be an issue with the error messages: unbind()
creates a callable that ignores a number of parameters passed in any future calls to call()
. So in this example:
callable.unbind(arguments.size()).call(arguments[0], arguments[1])
the method is not called with arguments[0]
and arguments[1]
(1
, []
), but with the previously bound parameters ([]
, 1
), which produces the message about an argument mismatch. However, the error message seems to refer to the (ignored) first argument to call
, which actually is an int, so the resulting message is the nonsensical "cannot convert int to int".
In a more simplified version:
func foo(int_param: int) -> void:
pass
[...]
Callable(foo).bind(1).unbind(1).call('text')
Callable(foo).bind('text').unbind(1).call(1)
The first call will work, while the second will result in "Cannot convert argument 1 from int to int".
from godot.
Thanks for your explanation, makes it a bit easier to work around this.
from godot.
Related Issues (20)
- Modifying Pinned Points of `SoftBody3D` is broken HOT 4
- GPUParticles3D often crashes godot on Android (PowerVR gpu) HOT 2
- Parser Error: Native class "EditorSpinSlider" cannot be constructed as it is abstract. HOT 3
- platform differences in rendering openXRCompositionLayers with Hole Punch feature
- Inconsistent behavior when undoing animation bezier movements upon selection of different animations HOT 1
- Signal 11 crash with no debug info in backtrace HOT 30
- Some weird behaviour involving CanvasLayer, Viewport and World2D HOT 3
- Round primitive meshes contain gaps. HOT 1
- Fullscreen mode's border color does not update when transparent background is disabled HOT 4
- FileSystem shows custom Resource icon of first external dependancy instead of correct icon HOT 3
- MultiMesh custom data bits are not accurate HOT 2
- Resource (re)importing speed is affected by editor framerate, leading to slow import speeds when the window is unfocused
- LineEdit sometimes does not display the last character
- ShapeCast3D detects colliders behind it HOT 5
- Log chinese error. HOT 3
- UV Map Node Ignored in GLTF/GLB Import HOT 2
- Main submenus are all black sometimes (XWayland windows, Nvidia) HOT 3
- PhysicsShapeQueryParameters3D's exclude array seems to be ignored in PhysicsDirectSpaceState3D intersect_shape func. HOT 7
- "Create New Node" dialog main scrolling area is not scrolled up to the top when summoning it HOT 1
- Web audio samples : AudioStreamPlayer's `finished()` signal doesn't emit when sound is done playing. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.