Not surprisingly, you can provide a custom setter function as well, though this is only available for var properties, not val. The value that is being set is identified as the parameter to the set() function that you declare after the property. What you do with that value is up to you.

You can learn more about this in:
Run Edit