Read value from a toggle
How can i read the value (selected/unselected) from a toggle? i don't see that an attribute for that to use with getattr.
Hi
the best I could do is to enable Parameter Mode Enable, thereby allowing one to set the toggle's initial state (0 or 1). This can then be "read" using [sel 0 1]. I guess you could also use [loadmess] to achieve the same thing. This probably won't help if you need to read the toggle state dynamically....
Brendan
....second best I could do:
Brendan
Reading it dynamically is indeed what i want to do (with js). I don't get it, i seem to be able to read every parameter i see in the inspector, but the most important one (its value, or selected-state) isn't accessible?
and third ugly-hacky-non_js way:
and a little nicer pattr-also_non_js:
I think this thread answers your question:
obj.getvalueof()
I think both n00b_meister and Andrzej are over thinking the non-js just a little bit ;)
unless I am way off base, this is probably the easiest way of doing it... non-js, that is.
Feel free to hit me over the head if I'm wrong!
M
This was indeed what i was looking for: obj.getvalueof()
Thanks!