Well, kleonc via reddit just slipped me this (thanks a million!):
You can create your own signal in the label's script. You can override _set method in where you can check if the text property is being changed and do something based on the new value. Something like this should work:
extends Label
signal textChanged(newText)
func _set(property, value):
match property:
"text":
if text != value:
text = value
emit_signal("textChanged", value)
return true
return false
and then you can just connect some methods to that signal:
# ...
yourLabel.connect("textChanged", self, "onLabelTextChanged")
# ...
func onLabelTextChanged(newText):
yourEraseButton.disabled = newText.empty()