Godot version:
3.2 dev
OS/device including version:
Windows 10 x64 / NVIDIA GeForce GTX 1060 6GB / Intel Core i7 4790K
Issue description:
A very boring and unnecessary thing is Label.text does not accept any number without first being converted to a string:
$Label.text = node.translation
will give an error Invalid set index 'text' (on base: 'Label') with value of type 'Vector3'.
So I have always to put an str():
$Label.text = str(node.translation)
I don't think that's feasible without changing the property to be of Variant type, which has branching implications (complexifies inspector, looses auto-completion...).
Coercion is not feasible either because prone to error in other areas where magical string auto-conversion could hide an error.
It's also just one occurrence of a text property, the same could be said of RichTextLabel and any function argument taking text... I don't think it's worth it doing special cases for that compared to casting properly with str.
Most helpful comment
I don't think that's feasible without changing the property to be of
Varianttype, which has branching implications (complexifies inspector, looses auto-completion...).Coercion is not feasible either because prone to error in other areas where magical string auto-conversion could hide an error.
It's also just one occurrence of a text property, the same could be said of
RichTextLabeland any function argument taking text... I don't think it's worth it doing special cases for that compared to casting properly withstr.