Just a really simple JavaScript patch and a macro showing how to combine multiple controls into a single structure, and then extract them back into discrete values again. I know I’ve banged on about this several times before, but the QTZ might just save someone some time.
You can probably get away with sticking the JS patch in a macro, and changing the names of the published ports for the input controls to something that makes more sense for your project, and it’ll still work. You could do the same for the published output ports of the ‘Controls From Struct’ macro. If you need more than 5 controls, you’ll have to edit the JS itself, but it’s pretty self-explanatory really. You’ll also need to add more Structure Key Member patches in Controls From Struct, and set the correct keys.
I’m sure it would be possible to eliminate the Structure Key Member patches and do the whole thing in another JavaScript patch, but the current method seems to work fine. Maybe I’ll tackle that at some point in the future.


0 Responses to “Controls Structures Demo QTZ”