title: wxWidgets generic event handlers
body: <p>Using wxSmith I have a dialog with many buttons which require the same event handlers, but of course acting on their own instance of data.</p>
  
  <p>Back in the day using C++ builder I would have placed an identifer string in the tag field of the widget. Then I would have a function to iterate all the widgets and use the string as the constructor to create a custom object and placed a pointer to that in the tag field.</p>
  
  <p>That way a generic event handler could simply cast the tag field to get a custom specic instance that knows what to do with the event.</p>
  
  <p>Other GUI API's, such as visual basic, were more simple but allowed an array of controls or an index and events were called with a reference to the index, so this sort of thing was still doable with arrays.</p>
  
  <p>So far the only way I can see off associating additional info with a wxWidget is to inheret it into my own customised control, but I fear that will break compatibility with wxSmith.</p>
  
  <p>Anybody know an elegant way to do this?</p>