]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWxGUIScriptingInterface.cxx
=== MAJOR RELEASE ====
[bbtk.git] / kernel / src / bbtkWxGUIScriptingInterface.cxx
index 136986a640ac2fd3068c3d85fe13a0851115974d..b7745ad0d43c0997ebcc10052f4abdf30d32508b 100644 (file)
@@ -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 : '"<<command<<"'"<<std::endl);
-printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 03 \n");
-    Interpreter* I = new Interpreter;    
-printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 04 \n");
+    
+    Interpreter::Pointer I = Interpreter::New();    
     I->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 : '"<<command<<"'"<<std::endl);
-    Interpreter* I = new Interpreter;    
+    
+    Interpreter::Pointer I = Interpreter::New();    
     I->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 "<<filepath<<std::endl;
-//EED  I->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;
   }
   //================================================================