Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 6 and Version 7 of code/doc/CommandExecutor


Ignore:
Timestamp:
Oct 7, 2008, 9:56:21 PM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/CommandExecutor

    v6 v7  
    3030    This is equal to ''MyClass::myfunction(0.1, 0.2, 0.3)'' provided that the function "myfunction" of the class "MyClass" was declared as a !ConsoleCommand.
    3131
     32The execute function optionally takes a second argument: '''execute('''''string, bUseTcl''''')'''. If ''bUseTcl'' is set to true (this is the default!) a command is first passed to Tcl (see [wiki:TclBind] for more information). Tcl parses the command, executes all Tcl-related code and if it finds a !ConsoleCommand only known to Orxonox it passes the command back to CommandExecutor::execute with ''bUseTcl = false''.
     33
     34 * Example 3:
     35{{{
     36CommandExecutor::execute("MyClass myfunction [expr 10+10]");
     37}}}
     38    This command will be sent to Tcl. Tcl first evaluates the subcommand within brackets ''expr 10+10'' which results ''20'' and then returns "MyClass myfunction 20" back to Orxonox where it will be executed equivalent to ''MyClass::myfunction(20)''.
    3239
    3340=== hint() ===