Design Patterns in the VCL -- Event as ???
Revealing the Magician's Secrets
- Component Palette ==> Prototype
- Panel ==> Composite
- .DFM file ==> Memento
- Event ==> ???
- Problem
- How do I notify multiple dependents of a change to their object of interest?
Issues
- In Delphi, I can only register one event handler
for a given component's event.
- Event handlers are function pointers, not objects -- if Delphi
weren't building them for us "for free", most people would
never consider using them.
- Isn't there a "more OOP" way to accomplish this?