X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkWxGUIScriptingInterface.cxx;h=b7745ad0d43c0997ebcc10052f4abdf30d32508b;hb=4ad5b5ee44357ad873bc8c43230defb6d0a79879;hp=136986a640ac2fd3068c3d85fe13a0851115974d;hpb=c2a4b1893412e50a3d9abff221938a2d16c4a7cb;p=bbtk.git diff --git a/kernel/src/bbtkWxGUIScriptingInterface.cxx b/kernel/src/bbtkWxGUIScriptingInterface.cxx index 136986a..b7745ad 100644 --- a/kernel/src/bbtkWxGUIScriptingInterface.cxx +++ b/kernel/src/bbtkWxGUIScriptingInterface.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $ Language: C++ - Date: $Date: 2008/03/25 15:47:54 $ - Version: $Revision: 1.4 $ + Date: $Date: 2008/04/18 12:59:16 $ + Version: $Revision: 1.5 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -69,7 +69,7 @@ namespace bbtk // m_mgr = new wxAuiManager(this); m_mgr.SetManagedWindow(this); - mInterpreter = new bbtk::Interpreter(); + mInterpreter = bbtk::Interpreter::New(); mInterpreter->SetUser(this); mInterpreter->SetCommandLine(true); mInterpreter->SetThrow(true); @@ -304,18 +304,13 @@ namespace bbtk //================================================================ void WxGUIScriptingInterface::OnMenuCreatePackage(wxCommandEvent& WXUNUSED(event)) { -printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 01 \n"); - std::string command("toolsbbtk/appli/CreatePackage"); -printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 02 \n"); + std::string command("toolsbbtk/appli/CreatePackage"); bbtkMessage("Debug",1,"Executing : '"<InterpretFile(command); -printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 05 \n"); - delete I; -printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 06 \n"); + } //================================================================ @@ -325,9 +320,9 @@ printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 06 \n"); { std::string command("toolsbbtk/appli/CreateBlackBox"); bbtkMessage("Debug",1,"Executing : '"<InterpretFile(command); - delete I; } //================================================================ @@ -354,10 +349,8 @@ printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 06 \n"); { std::string doc_path = ConfigurationFile::GetInstance().Get_doc_path(); std::string filepath = doc_path+"/bbdoc/make-index.bbs"; - Interpreter* I = new Interpreter; -//EED std::cout << "bbi: include "<InterpretFile( filepath ); + Interpreter::Pointer I = Interpreter::New(); I->InterpretLine( "exec freeze"); I->InterpretLine( "include *"); @@ -366,7 +359,6 @@ printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 06 \n"); I->InterpretLine( "index "+doc_path+"/bbdoc/index-category.html Categories"); I->InterpretLine( "index "+doc_path+"/bbdoc/index-adaptors.html Adaptors"); - delete I; } //================================================================