Currently, the cast function provided to appcli.param() is only invoked if the getter does not have it's own cast function. In other words, it serves as the default cast function, and the default can be overridden.
However, I realized that it may be more intuitive to think of this cast function as something that should be applied on all getters, in addition (and after) to any getter-specific cast functions.
The specific problem I had was:
One config that returned a list
Another config that returned a scalar, with a cast function to make it a list
A param-level cast-function to operate on the list.
The drawback with this is that it becomes impossible to override the param-level cast function. I'm not quite sure if that's a good or bad thing.
Currently, the cast function provided to
appcli.param()
is only invoked if the getter does not have it's own cast function. In other words, it serves as the default cast function, and the default can be overridden.However, I realized that it may be more intuitive to think of this cast function as something that should be applied on all getters, in addition (and after) to any getter-specific cast functions.
The specific problem I had was:
The drawback with this is that it becomes impossible to override the param-level cast function. I'm not quite sure if that's a good or bad thing.