posted 15 years ago
Well, the brute force method just has your code translate a string to an action:
etc.
Or you could use reflection to look up a method based on its name. This method can be made more generic, but it restricts your "expressions" to legal and useful method names, and is a bit more complicated. It doesn't look likely that your actions are all going to have the same signature, so you might have to represent signatures and parameters, as well as methods, somehow.
rc