MCPcopy Create free account
hub / github.com/christophhart/HISE / defaultControlCallbackIdle

Method defaultControlCallbackIdle

hi_scripting/scripting/ScriptProcessor.cpp:324–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324void ProcessorWithScriptingContent::defaultControlCallbackIdle(ScriptingApi::Content::ScriptComponent *component, const var& controllerValue, Result& r)
325{
326 ScopedValueSetter<bool> objectConstructorSetter(allowObjectConstructors, true);
327
328 int callbackIndex = getControlCallbackIndex();
329
330 if (auto scriptEngine = thisAsJavascriptProcessor->getScriptEngine())
331 {
332 LockHelpers::SafeLock sl(getMainController_(), LockHelpers::Type::ScriptLock);
333
334 scriptEngine->maximumExecutionTime = HiseJavascriptEngine::getDefaultTimeOut();
335
336#if ENABLE_SCRIPTING_BREAKPOINTS
337 thisAsJavascriptProcessor->breakpointWasHit(-1);
338#endif
339
340 scriptEngine->setCallbackParameter(callbackIndex, 0, component);
341 scriptEngine->setCallbackParameter(callbackIndex, 1, controllerValue);
342 scriptEngine->executeCallback(callbackIndex, &r);
343
344 }
345
346 BACKEND_ONLY(if (!r.wasOk()) debugError(dynamic_cast<Processor*>(this), r.getErrorMessage()));
347}
348
349
350

Callers 1

controlCallbackMethod · 0.80

Calls 9

getDefaultTimeOutFunction · 0.85
getScriptEngineMethod · 0.80
breakpointWasHitMethod · 0.80
setCallbackParameterMethod · 0.80
getControlCallbackIndexFunction · 0.70
ifFunction · 0.50
executeCallbackMethod · 0.45
wasOkMethod · 0.45
getErrorMessageMethod · 0.45

Tested by

no test coverage detected