Disable live.toggle from javascript syntax
In this wonderful thread I got advise on how to list methods for an object:
https://cycling74.com/forums/sending-a-message-directly-to-object-using-js/
For a live.toggle one of the methods available is active()
How do I call this and can this be used to disable an active button?
var objToggle = this.patcher.getnamed("livetoggle");
Produces this:
listMethods(playoncebutton);
js: ################METHODS########################
js: reference()
js: openquery()
js: bang()
js: outputvalue()
js: int()
js: float()
js: assign()
js: set()
js: init()
js: preset()
js: sendbox()
js: activebgcolor()
js: learning()
js: annotation()
js: bordercolor()
js: presentation_rect()
js: bgoncolor()
js: activebgoncolor()
js: patching_position()
js: presentation_size()
js: patching_rect()
js: position()
js: hint()
js: presentation()
js: parameter_enable()
js: patching_size()
js: rounded()
js: active()
js: size()
js: bgcolor()
js: focusbordercolor()
js: presentation_position()
js: _parameter_order()
js: valueof()
js: _parameter_initial()
js: annotation_name()
js: _parameter_linknames()
js: _parameter_longname()
js: _parameter_shortname()
js: _parameter_range()
js: _parameter_modmode()
js: _parameter_modrange()
js: _parameter_initial_enable()
js: _parameter_unitstyle()
js: _parameter_units()
js: _parameter_exponent()
js: _parameter_steps()
js: _parameter_speedlim()
js: _parameter_defer()
js: _parameter_invisible()
js: _parameter_mapping_index()
js: ################END########################
I found that this works but not sure if this is best practise?objToggle.set(0);
Also objToggle.getvalueof();
works to get the current value but that is not listed.. Am I missing something generic here?