I stumble several times over an interesting situations, most of you will know: different events require very similiar handling.
A common problem would be an increment/decrement combination, e. g. the click events of a plus and minus button β sometimes this is easy (just an arithmetic operation, the rest is equal for both events), but sometimes large parts of the following graph distinguish all over in just a tiny variable, often a bool
( true
at the first event, false
at the second), and sometimes the beginning of the handling is equal.
Like in the following simplified example:
When you want to avoid code duplication and do not want to create an extra function, the one and only (?) solution is to introduce a variable:
My suggestion is to automate this by a macro I call MergeExecs
, that uses a wildcard.
No itβs really simple:
There is only one problem: You can only merge two execution pins. Of course, you can just successively repeat the new macro, but it would be great if you could just add more execution/value combinations by a small plus button (similiar to the add float function).
What do you think of this idea? Isnβt it annoying that such a macro is missing?