live.toggle causing 'Live API is not initialized' message - standard toggle does not
I get this well-known message in the Max for Live window, not the Max console.
live.object: Live API is not initialized, use live.thisdevice to determine when initialization is complete
This message appears when I save the device or load the device in Live.
I read many thing about this error but whatever I tried, I couldn't get rid of it. Until I figured out that it is the live.toggle (or live.text) causing this message. When I replace the live.toggle it with a standard toggle the message is gone.
Is this a bug or or do live.objects need a little extra patching? The small demo device works fine by the way.
With live.toggle/text in "Automated and Stored" mode, it's probably that when the device loads, they restore and output their value before [live.object] is ready to receive the message "set solo $1". As a test of the hypothesis you can see if it goes away if you change the "Parameter Visibility" attribute to Hidden.
Yes, you are right. 'Stored' is the problem. I get no message when I set it to Hidden.
But is I want to automate or store values, is there a way to get around this message?
A [gate] object after the live.toggle would work. Just open the gate and send the live.toggle 'outputvalue' message in response to [live.thisdevice] ... after setting the [live.object] id.
I wish all developers scrutinized their error/warning messages this much :)
That did the trick.
Here the adjusted patch for other users with the same problem.