Skip to content

Using a class for action/feedback definitions #114

Open
@Julusian

Description

@Julusian

What if we used classes for 'ActionDefinition'.
The various callbacks could be methods to implement.
We could allow retrieving the ones which have been defined.
And the class could have an 'update definition' function, as part of an api to allow granular replacing of actions

We would have an ActionDefinitionBase class which modules would extend for each action.

This could run in parallel with the 'old' implementations, using instanceof would be a good sanity check anyway, anything which didn't match would be treated as the old format and would be automatically translated by us.

At the same time, my proposal for the options object could be applied, so that we can start to hide the handling of variables from modules.

In the future, we can add additional base classes when wanting to make larger changes to the api, and handling each of them should be doable, using instanceof and wrapping internally to a common interface. We wouldn't do this often, but it would allow us to pre-emptively introduce any breaking changes.
this starts to take the decklink COM approach, always adding new types, always leaving the old ones.

BUT

before doing anything to the actions api, I do want to try and push for properties.
because if pushing anyone to a new api, it should be that one if we are going to do that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions