We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a585858 commit 27347a4Copy full SHA for 27347a4
examples/graphics/source/examples/Python.h
@@ -39,17 +39,16 @@ class PythonDemo : public yup::Component
39
locals["yup"] = pybind11::module_::import (yup::PythonModuleName);
40
locals["this"] = pybind11::cast (this);
41
42
- auto result = engine.runScript (yup::String (R"(
+ auto script = yup::String (R"(
43
import sys
44
print("Scripting YUP!")
45
this.backgroundColor = yup.Color.opaqueRandom()
46
this.repaint();
47
- )")
48
- .dedentLines(),
49
- locals);
+ )");
50
+ auto result = engine.runScript (script.dedentLines(), locals);
51
if (result.failed())
52
- std::cout << result.getErrorMessage();
+ YUP_DBG (result.getErrorMessage());
53
};
54
addAndMakeVisible (runPython);
55
}
0 commit comments