Page 1 of 1

About the new note in Documentation: LiveAPI Object

Posted: Sat Mar 26, 2011 5:19 pm
by Surreal
Technical note: you cannot use the LiveAPI object in JavaScript global code. Use the live.thisdevice object to determine when your Max Device has completely loaded (the object sends a bang from its left outlet when the Device is fully initialized, including the Live API).
does this 'only' mean that i cannot create LiveAPI objects in global code or does it mean LiveAPI objects cannot be added to global scope? I think it is the former, But i just want to make sure. It makes more sense that I can still add to global scope, as observers need to stick around.

Re: About the new note in Documentation: LiveAPI Object

Posted: Sun Mar 27, 2011 11:51 am
by ST8
I think it just means you cant initiate them in the global scope as the liveapi object wont be ready at that time. Ive got no problem with a globally declared variable being initiated in a function triggered by live.thisdevice.