From: eduardo.davila@creatis.insa-lyon.fr Date: Thu, 16 Jan 2025 08:42:43 +0000 (+0100) Subject: Test code X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=18e8bb4c5791a6afe3907d4de64cf9d30c874b8f;p=bbtk.git Test code --- diff --git a/kernel/appli/bbi/bbi.cxx b/kernel/appli/bbi/bbi.cxx index c4729fc..2402646 100644 --- a/kernel/appli/bbi/bbi.cxx +++ b/kernel/appli/bbi/bbi.cxx @@ -219,46 +219,38 @@ bool wxBBIApp::OnInit( ) //See http://www.wxwindows.org/faqgtk.htm#locale setlocale(LC_NUMERIC, "C"); #endif - if (cmd.quiet) bbtk::MessageManager::SetMessageLevel("max",0); if (cmd.debug) bbtk::MessageManager::SetMessageLevel("all",9); - - //Borrame //printf ("EED bbi wxBBIApp::OnInit .....................\n"); //cmd.input_file.push_back("/home/davila/Borrame/testwt.bbs"); - bbtk::WxGUIConsole *I = new bbtk::WxGUIConsole(0,_T("bbi"),wxSize(800,600)); SetTopWindow(I); if (cmd.console) I->Show(true); - - I->SetInputs(cmd.param_map); - bool help_on_script = cmd.help && (cmd.input_file.size() > 0); if (help_on_script) I->SetNoExecMode(true); if (cmd.graphical_dialog) I->SetDialogMode(bbtk::VirtualExec::GraphicalDialog); if (cmd.text_dialog) I->SetDialogMode(bbtk::VirtualExec::TextDialog); - std::vector::const_iterator i; bool error = false; - - - for (i=cmd.input_file.begin(); i!=cmd.input_file.end(); ++i) - { + printf("EED wxApp::OnInit --start\n"); + bbtk::BlackBox::bbGlobalSetInConstruction(true); + for (i=cmd.input_file.begin(); i!=cmd.input_file.end(); ++i) + { error = ! I->InterpretFile(*i); if (error) break; - } + } + printf("EED wxApp::OnInit --end\n"); + bbtk::BlackBox::bbGlobalSetInConstruction(false); bool show_on_error = error && ! cmd.no_console; if (show_on_error) I->Show(); - I->SetNoExecMode(false); - if (help_on_script) - { - std::string package; + { + std::string package; I->GetInterpreter()->GetExecuter()->GetFactory()->PrintHelpDescriptor("workspace",package,false); - } + } /* @@ -270,16 +262,12 @@ bool wxBBIApp::OnInit( ) { I->Close(); // std::cout << "I->Close"<Close"< BlackBox::bbExecute("<<(int)force<<")" < InterpreterVirtual::InterpretFile(\""< InterpreterVirtual::InterpretCurrentStreams()"<0) + while (mFile.size()>0) { while (!mFile.back()->eof()) { mLine.back()++; @@ -876,17 +876,13 @@ printf("EED InterpreterVirtual::CatchUnknownException End\n"); { commandMessage(); //EED Borrame mVirtualExecuter->HelpMessages(); - } - else - { + } else { commandMessage(words[1],words[2]); //EED Borrame sscanf(words[2].c_str(),"%d",&level); //EED Borrame mVirtualExecuter->SetMessageLevel(words[1],level); } return; - } - else - { + } else { bbtkMessage("echo",2,line<SetName( bbtk::std2wx( bbGetInputWinTitle() ) ); @@ -164,7 +158,6 @@ void LayoutLine::Process() // when window is shown void LayoutLine::OnShowWidget() { - printf("EED LayoutLine::OnShowWidget\n"); if (bbGetOutputWidget()!=NULL) { bbGetOutputWidget()->Layout();