Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 25, 2009, 9:46:24 PM (15 years ago)
Author:
landauf
Message:

small changes relating to tcl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/core/TclThreadManager.cc

    r3344 r3350  
    257257            newbundle->interpreter_->def("execute",      TclThreadManager::tcl_execute,      Tcl::variadic());
    258258            newbundle->interpreter_->def("crossexecute", TclThreadManager::tcl_crossexecute, Tcl::variadic());
    259             newbundle->interpreter_->eval("proc query       args     { orxonox::query " + id_string + " $args }");
     259            newbundle->interpreter_->eval("proc query      {args}    { orxonox::query " + id_string + " $args }");
    260260            newbundle->interpreter_->eval("proc crossquery {id args} { orxonox::crossquery " + id_string + " $id $args }");
     261            newbundle->interpreter_->eval("proc running    {}        { return [orxonox::running " + id_string + "] }");
    261262
    262263            // Define a variable containing the thread id
     
    268269
    269270            // Redefine some native functions
    270 //            newbundle->interpreter_->eval("rename while tcl::while");
    271 //            newbundle->interpreter_->eval("proc while {test command} { tcl::while {[uplevel 1 expr $test]} {uplevel 1 $command} }"); // (\"$test\" && [orxonox::running " + id + "]])
    272 //            newbundle->interpreter_->eval("rename for tcl::for");
    273 //            newbundle->interpreter_->eval("proc for {start test next command} { uplevel tcl::for \"$start\" \"$test\" \"$next\" \"$command\" }");
     271            newbundle->interpreter_->eval("rename while tcl::while");
     272            newbundle->interpreter_->eval("rename orxonox::while while");
     273            newbundle->interpreter_->eval("rename for tcl::for");
     274            newbundle->interpreter_->eval("rename orxonox::for for");
    274275        }
    275276        catch (const Tcl::tcl_error& e)
     
    296297        // TODO
    297298        // Not yet implemented
     299        TclInterpreterBundle* bundle = TclThreadManager::getInstance().getInterpreterBundle(id);
     300        if (bundle)
     301        {
     302            bundle->bRunning_ = false;
     303        }
    298304    }
    299305
Note: See TracChangeset for help on using the changeset viewer.