Hi,
I would like to implement a scripting method for faster user input. This should be like programm specific internal programming, oder a kind of Macro.
examples: – AutoCAD: the user can draw a line by clicking two point or by typing “line, x1, y1, x2, y2” – gnuplot: changing the label by clicking in the menu “Axis / X Label” or typing “set xlabel ‘abc’”.
I guess there is a smarter way than do thomething like this:
switch(line){
case "abc": methodABC(); break;
case "def": mathodDEF(); break;
}
because, this structure will blow up, if there are a lot of methods available.
↧