!7 set flag replaceACCInClassLoader_fullException. set flag DynModule. // use central transpiler cmodule StandardFunction { switchable S functionName; transient DynamicCallable f; transient Throwable error; start { dm_registerAs('standardFunctionHolder); onChange(r updateStatuses); loadFunction(); } visual vstack(centerAndEastWithMargins( withLabel("Function:", dm_label('functionName)), jThreadedButton("Choose...", rEnter { dm_stringFieldDialog('functionName, onSet := rEnter newFunctionName) }))); void newFunctionName() { setField(f := null); setField(error := null); loadFunction(); } void updateStatuses { setModuleName( empty(functionName) ? "Standard function as module" : "Function " + functionName + " - " + (hasError() ? "Error" : loaded() ? "loaded" : "not loaded")); } void loadFunction() q { try { setField(f := methodAsDynamicCallable(loadFunctions_cached(functionName), functionName)); } catch e { setFields(f := null, error := e); } } // API S functionName() { ret functionName; } O callTheFunction(O... args) { while (f == null && error == null) sleep(10); if (error != null) throw rethrow(error); ret callF(f, args); } bool loaded() { ret f != null; } bool hasError() { ret error != null; } }