You can set properties to other properties on prop_init, but I'm not sure about the particular scenario you're proposing, since usually what we do is check whether $*Y has been set; if it has, we use the user-defined value. If it hasn't, we use the fallback value. So something like this:
layout: property Color X { des = "base value" } property Color Y { des = "falls back on base value if not provided" } set X = "blue" set Y = ""
function prop_init() {
if ( $*Y == "" or not defined $*Y ) {
# Y has no value, let's fill it in
$*Y = $*X
}
}
no subject
layout:
property Color X { des = "base value" }
property Color Y { des = "falls back on base value if not provided" }
set X = "blue"
set Y = ""