Design Patterns in the VCL -- Event as ???


Revealing the Magician's Secrets

  1. Component Palette ==> Prototype

  2. Panel ==> Composite

  3. .DFM file ==> Memento

  4. 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?

[ Next | Previous | Top | Outline | Glossary | Links ]


These pages maintained by Tres Seaver of Palladion Software . Copyright 1998, all rights reserved.