On Wednesday, October 26, 2011 at 09:58 PM, Michael G wrote: > So now the question is one of good event handler design, which I don't have > experience with. How does one design a good event handler? Is the pattern > one method per type of event? Or one method to do the dispatching? Or > something else?
I've done this several times. I prefer one method per type of event (hello, cheap and easy polymorphism!). This is also one case in which I find an abstract base class acceptable; the null method pattern means never having to call ->can(). -- c