title: Delphi - dynamically calling different functions
body: <p>I have a treeview (VirtualTree) which has nodes.  When a user clicks on a node, I need to run a specific function, passing the text name of the node.  This function is one of the attributes of the node.  For example, assume two nodes.</p>
  
  <p>Node 1, Name = MyHouse, Function=BuildHouse<br>
  Node 2, Name = MyCar, function = RunCar</p>
  
  <p>When I click on Node 1, I need to call the function BuildHouse('MyHouse');<br>
  When I click on Node 2, I need to call RunCar('MyCar');  </p>
  
  <p>Arguments are always strings. It should be noted that these are true functions, NOT members of a class.</p>
  
  <p>There are too many nodes to have a CASE or IF/THEN type of code structure.  I need a way to call the various functions dynamically, i.e. without hardcoding the behavior.
  How do I do this?  How do I call a function when I have to lookup the name of the function at runtime, not compile time?</p>
  
  <p>Thanks,
  GS</p>