u/NotPromKing

▲ 4 r/QSYS

EDIT: See my comment below that expands on the suggested idea to use QSYS Notifications.

So I'm wanting to call and pass information from a function in one text controller, to a function in another text controller. I have A way of making it work, but it seems a little awkward and I'm wondering if I'm missing a better way.

TextControllerA has a function:

function funcAddNumbers(a, b)
  print (a + b)
end

and two components
intNumberA -- knob set as integer
intNumberB -- knob set as integer

From TextControllerB I can do the following:

RemoteFunction = Component.New('TextControllerA')
RemoteFunction["intNumberA"].value = 1
RemoteFunction["intNumberB"].value = 2

From there, I can use event handlers or triggers inside TextControllerA to kick off funcAddNumbers, passing in the value of the two knob components.

This works, but it's a bit cumbersome and requires making new components for every unique piece of data I might want to pass into a function. Am I on the one and only correct path, or is there a better way of doing this?

reddit.com
u/NotPromKing — 8 days ago