At present it's impossible to set() derived properties, and where this is needed an associated defined input property must be created. I've only encountered one example so far where this was needed, and it may turn out to be quite rare.
If it does become more commonplace though, we might consider allowing the model to indicate when it's acceptable for derived properties to be set via the model. For example, we could introduce a $ notation, like this:
model.addHandler(['list.$prop'], ['list.prop'], function(input, output, currentInput, currentOutput) {
// ...
});
Here, I've used list.$prop to indicate that I want the handler to be given the values of the prop property provided using set(). Feel free to contribute if you can think of a better syntax for this.
At present it's impossible to
set()derived properties, and where this is needed an associated defined input property must be created. I've only encountered one example so far where this was needed, and it may turn out to be quite rare.If it does become more commonplace though, we might consider allowing the model to indicate when it's acceptable for derived properties to be set via the model. For example, we could introduce a
$notation, like this:Here, I've used
list.$propto indicate that I want the handler to be given the values of thepropproperty provided usingset(). Feel free to contribute if you can think of a better syntax for this.