How to organize arguments in connect

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Superyen

Hi everyone :slight_smile:
I would like to append arguments to the front of the default array passed to the callback :

var aParamPath = “anchor_left”
var aSpinBox =
aSpinBox.connect(“value_changed”, self, “set”, [aParamPath, value])

Of course this code doesn’t compile because the compiler doesn’t know what value is.
I want it to be the arg of value_changed(float value) signal

Is this possible ? How ?

For now i solved it this way but i think we can find better :

param_control.connect(“value_changed”, self, “set_swap”, [param_node, param.param_id])

func set_swap(value, param_node, param_path):
param_node.set(param_path, value)

Thank you very much

send a feature request to godot github.

hungrymonkey | 2018-07-20 14:11