Changeset 1276 for code/branches/console/src/core/TclBind.cc
- Timestamp:
- May 15, 2008, 1:05:58 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/TclBind.cc
r1267 r1276 35 35 #include "TclThreadManager.h" 36 36 #include "TclBind.h" 37 #include "util/String.h" 37 38 38 39 namespace orxonox … … 104 105 std::string TclBind::tcl_query(Tcl::object const &args) 105 106 { 106 std::cout << "Tcl_query: args: " << args.get() << std::endl; 107 std::string command = args.get(); 107 COUT(4) << "Tcl_query: " << args.get() << std::endl; 108 108 109 while (command.size() >= 2 && command[0] == '{' && command[command.size() - 1] == '}') 110 command = command.substr(1, command.size() - 2); 109 std::string command = stripEnclosingBraces(args.get()); 111 110 112 111 if (!CommandExecutor::execute(command, false)) … … 121 120 void TclBind::tcl_execute(Tcl::object const &args) 122 121 { 123 std::cout << "Tcl_execute: args: " << args.get() << std::endl; 124 std::string command = args.get(); 125 126 while (command.size() >= 2 && command[0] == '{' && command[command.size() - 1] == '}') 127 command = command.substr(1, command.size() - 2); 122 COUT(4) << "Tcl_execute: " << args.get() << std::endl; 123 std::string command = stripEnclosingBraces(args.get()); 128 124 129 125 if (!CommandExecutor::execute(command, false)) … … 150 146 void TclBind::bgerror(std::string error) 151 147 { 152 while (error.size() >= 2 && error[0] == '{' && error[error.size() - 1] == '}') 153 error = error.substr(1, error.size() - 2); 154 155 COUT(1) << "Tcl background error: " << error << std::endl; 148 COUT(1) << "Tcl background error: " << stripEnclosingBraces(error) << std::endl; 156 149 } 157 150
Note: See TracChangeset
for help on using the changeset viewer.