Assigning a control callback to multiple controls – with additional arguments
-
David made this nice video: this nice video on how to assign a control callback to multiple controls and I asked for more… To be specific, for how to pass more arguments to the function than the two most obligatory ones: value and component. So he suggested to elaborate this here…
What I'm trying to do is creating a function that can additionally process a minimum numeric value, a maximum numeric value and a string, because I have 2 rows of controls:
I'd like the callback to define increment and decrement functions for these green digit screens above while the DELAY row should allow values between 10 and 20 and the EVENT row values between 0 and 50.Can this be done in a fashion like in David's video?
-
@Frankbeat Aha now I understand what you're after. I think the solution is two different callbacks. One for the 10/20 buttons and one for the 0/50 buttons.
-
@d-healey So it would sum up to 4 callbacks, right? Because the compare operator for increment and decrement buttons has to be separated, too?
-
Actually it's doable in one CB:
HiseSnippet 1534.3ocyY0taaaCEkJIJH1aoHsnO.DAXXxnot9yrg0Ezr70lwpaLp6J5PQQGkDkMQkIMnnRi2Vek1yPeK1qwdC5tTR1RI01MxHo09GAgj2Cum6QWRdEUGovgFDHjHiBOazPJx3qM6Nhq5eXeBiiZcDx3VlsIAJpDG20AiFRBBntHCiU+YcGFEVCE86+dzADeB2gl1EB8bAyg9X1.lJs2N6+qLe+SHtzmwFjw5F62xQvOT3KBA9rpYEzPhyaH8nOgnMaESjw5G6xTBYWEQQC.aNP3Npaewa4w1+bV.y1mpaTE0Eln3tQG1m461YbrFfPFq0IMxWMNxuqYalKaR+oJvVQCfSQjUCLVYdTpZNnjQFJsVLktsYWGIanJcDMe9JyVb3AhGAj5rTI1VzJqtg4gBvBtp7.xanmHgFSPXsakJ6fg+T5gEAqBD9zxN9ThzB5nHn+AJ7YDI121O.uG9kimodT0ghACEbng01OlXS8qtcocJh+neyAQsbindtQzH2HZlaD6tcoWcA0xVwmiZ4RcNPwqjG2v34FRrWpleuTM+doV98Rs76k542K0yuWZjeuzH+doY98Ry3rrLoYmQ7CoQIZQC7fGDuL0gvw1TbHrO.VIvRpCw2Gq5SS.Tjw8YbJ1Kj6nXBNVv03z9VJ7sbF63chsuTw+pXgXjuTaWYF2kd9odoFV5U.G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