X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkWxGUIScriptingInterface.cxx;h=966c1f70486f924d6c5f3eb88e6b00215d0f4322;hb=f3d05516965aece323133928f72d85e38c2b0b71;hp=245e1f2a927ebfcb3258f1c350b2090e3b66b68f;hpb=fb65ef0feb38b84723ea928ec3d3c056ba26274e;p=bbtk.git diff --git a/kernel/src/bbtkWxGUIScriptingInterface.cxx b/kernel/src/bbtkWxGUIScriptingInterface.cxx index 245e1f2..966c1f7 100644 --- a/kernel/src/bbtkWxGUIScriptingInterface.cxx +++ b/kernel/src/bbtkWxGUIScriptingInterface.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $ Language: C++ - Date: $Date: 2008/10/21 14:38:31 $ - Version: $Revision: 1.31 $ + Date: $Date: 2008/12/15 09:04:47 $ + Version: $Revision: 1.32 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -95,7 +95,8 @@ namespace bbtk mInterpreter->SetUser(this); mInterpreter->SetCommandLine(true); mInterpreter->SetThrow(true); - + // mInterpreter->AddBreakObserver + //boost::bind( &WxGUIScriptingInterface::InterpreterUserOnBreak, this )); //============== // Menu wxInitAllImageHandlers(); @@ -260,7 +261,8 @@ namespace bbtk m_mgr.Update(); // LoadPerspective(); - + mBreaked = false; + wxTipWindow* tip = new wxTipWindow(this, _T("\n Welcome to bbStudio !\n\n To run a demo or example:\n 1. click on the 'Demos' or 'Examples' link\n 2. select a demo or example\n 3. click on the '[source]' link : the source file is loaded in bbStudio\n 4. click on the 'Run' button (the arrow at the bottom right of the source file) \n"),1000); tip->CenterOnParent(); @@ -282,24 +284,54 @@ namespace bbtk mWxGUITextEditor->Open(filename); } //================================================================ - -#define CATCH_MACRO \ - catch (QuitException e) \ + /* + catch (BreakException e) \ { \ - std::cout << "* quit exception caught"< 0) { \ - std::cerr << "* Exception thrown : "< 0) { \ + std::cerr << "* Exception thrown : "<GetCurrentPage()->GetText(); try { - // std::cout << "RUN"<IsChecked()) WxGUICommandEnter("reset"); - mInterpreter->InterpretBuffer(buf); + if (!mBreaked) + { + if (mwxMenuItemReset->IsChecked()) WxGUICommandEnter("reset"); + mInterpreter->InterpretBuffer(buf); + } + else + { + mBreaked = false; + mInterpreter->InterpretCurrentStreams(); + } // std::cout << "EO RUN"<