You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overridden built-in setter functions are not called when setting a value, even when using the self keyword.
(Maybe this is expected, but it doesn't seem right. You have to always remember to call the setter.)
You can define a _set() function to create magic setters/getters
I tried to do that, but this gives me a stack overflow.
func _set(property: String, value) -> bool:
if get(property) != null:
match property:
"bbcode_text":
"< code here >"
_:
pass
set(property, value)
return true
else:
return false
However, looks like this is already fixed by #47672.
Also, according to #844, setters will get called by default in 4.0, so this will no longer be an issue.
I think this is done by design.
In that case, I'll close this, since 4.0 is almost here and I don't think a change like this will be made for 3.x
Godot version:
3.3 / 3.3.1
OS/device including version:
Windows 10
Issue description:
Overridden built-in setter functions are not called when setting a value, even when using the
self
keyword.(Maybe this is expected, but it doesn't seem right. You have to always remember to call the setter.)
Steps to reproduce:
(See example project)
Minimal reproduction project:
Method Override Bug.zip
The text was updated successfully, but these errors were encountered: