mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-10 03:54:54 -06:00
bazaar: ValueCtrl: some type and handling fixes; LogPosCtrl & RectCtrl: handling fixes; BoostPyTest: type handling fixes, live eval example, Callback stack overflow fix
git-svn-id: svn://ultimatepp.org/upp/trunk@3426 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d96828eab0
commit
b43569fc91
10 changed files with 137 additions and 68 deletions
|
|
@ -8,6 +8,16 @@ void BoostPyTest::CBi(int i)
|
|||
RLOG(i);
|
||||
}
|
||||
|
||||
void BoostPyTest::EvalCB()
|
||||
{
|
||||
String s = ev.GetData();
|
||||
|
||||
object o = eval(s.Begin(), main_namespace, main_namespace);
|
||||
Value v = extract<Value>(o);
|
||||
|
||||
evr.SetData(v);
|
||||
}
|
||||
|
||||
BoostPyTest::BoostPyTest()
|
||||
{
|
||||
CtrlLayout(*this, "Boost Test");
|
||||
|
|
@ -26,7 +36,7 @@ BoostPyTest::BoostPyTest()
|
|||
|
||||
try {
|
||||
object main_module(handle<>(borrowed(PyImport_AddModule("__main__"))));
|
||||
object main_namespace = main_module.attr("__dict__");
|
||||
main_namespace = main_module.attr("__dict__");
|
||||
|
||||
handle<> ign(PyRun_String( "print \"Hello, World\"",
|
||||
Py_file_input,
|
||||
|
|
@ -69,8 +79,16 @@ BoostPyTest::BoostPyTest()
|
|||
object o = eval("100 + upp.sl.data", main_namespace, main_namespace);
|
||||
int data = extract<int>(o);
|
||||
|
||||
ev.WhenEnter = THISBACK(EvalCB);
|
||||
ex <<= THISBACK(EvalCB);
|
||||
evr.SetReadOnly();
|
||||
ev.SetData("100 + upp.sl.getdata()");
|
||||
EvalCB();
|
||||
|
||||
String sc =
|
||||
|
||||
"upp.app.title = 'My Big BoostPy Test Environment'\n"
|
||||
|
||||
#if PUREVIRTEST
|
||||
#else
|
||||
"p = hello.World()\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue