Bindable properties in extensions

Right now, in my components, I’m using alot of par-executes just to call the actual logic methods of my components.
I had the feeling that dependable properties already go into a similiar direction, but the only go in one direction.
The idea is that I would like to be able to inherit a class of “bindableProperty” and directly grab into the getter/setter of that new class so implement custom logic, mainly on the set part so it is no longer neccesarry to create A: an par exec for every logic, or B: To use a dict as a “switch” statement (dont get me starting on elif…)

1 Like

Lately I’ve been avoiding elif and passing most of my logic via parexec pulses from customPars. basically just dropping in one of these for my extensions and calling it a day:

def onPulse(par):
    try:
        getattr(parent(), par.name)()
    except Exception as e:
        debug(e)
    return
1 Like

prety neat one, like :slight_smile: