Hi everyone, is there a way to get the value of a [toggle] object without changing its state? In the same way one can send a [bang( to a [hslider] or [hradio] to get it's current value. Thanks
-
Query a [toggle] object
-
@weightless thanks. This is a solution but to make my patch a bit less complicated I wanted to send a message directly to the GUI object and get its value back. Probably it's just not possible this way.
-
@dom1817 I don't think that is a built-in feature because if you send a bang to a toggle, it changes its state. But if you want to keep your patch tidy, you could turn my patch into an abstraction and use that instead of a toggle.
toggle2.zip
look at the help file. -
@dom1817 You can also use the build in send feature of the toggle and send to the receive of a number box. This way the number box will always display the state of the toggle. You can also use another toggle instead of a number box.
-
I came up with a clean solution based on your suggestions.
Thanks a lot for the heads up!