I'm trying to use signals connected by code. In my case here's an example:
#Here, the value of $Textline.text is "bar"
func _ready():
$Button.connect("pressed",self,"print_textline_text",[$Textline.text]
print_textline_text(message):
print("the message is" + str(message))
Right now if I click the button, the function will print "bar", everything it's normal, but, if I change the value during runtime, to "foo", and click the button, the fuction will print "bar" again. As it took the value that the $Textline.text when the _ready() method was called.
So what I need is a way to reference the property and not the value. So when the signal gets triggered, it will take the current value and not the one that was there in the _ready call.
The example is just to give some context, my current project needs, to reference that property and I can't simply put it inside the fuction as it has to be dynamic. I don't want to have extra variables running around to pass a dynamic value, because it's quite probable that there is a way to do it but I don't know how.