Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 4 and Version 5 of code/doc/CommandExecutor


Ignore:
Timestamp:
Oct 7, 2008, 6:28:47 PM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/CommandExecutor

    v4 v5  
    110110
    111111=== complete() ===
    112 '''complete('''''string''''')'''
     112'''complete('''''string''''')''' looks at the list of possible classnames, functionnames and arguments (like hint() in example 2) and trys to complete the command if there's only one possibility.
     113
     114Note: If there's only one possible class with only one function and only one possible argument, complete() returns the whole command.
     115
     116 * Example 2:
     117{{{
     118// Existing functions:
     119// abc, function1, function2, test, temporary
     120
     121CommandExecutor::complete("a");
     122// returns "abc" because it's the only possibility
     123
     124CommandExecutor::complete("fun");
     125// returns "function" because function1 and function2 are possible and
     126// "function" is the common begin of both
     127
     128CommandExecutor::complete("t");
     129// returns "te" because it's the common begin of "test" and "temporary"
     130}}}
     131
     132 * Example 2:
     133{{{
     134// Existing classes:
     135// MyClass
     136
     137// Existing functions in MyClass:
     138// myfunction
     139
     140// Possible arguments of MyClass::myfunction:
     141// 10
     142
     143CommandExecutor::complete("m");
     144// returns "MyClass myfunction 10"
     145}}}
    113146
    114147=== evaluate() ===