[fpc-pascal] New multicast event implementation
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Wed Feb 2 09:24:54 CET 2011
On Tue, 1 Feb 2011, Anthony Walter wrote:
> Hello all. I implemented a new type of multicast events in Delphi based on
> generics. I thought someone could maybe consider and convert this
> implementation to Free Pascal. Here is a link to an article describing the
> implementation, its benefits and usage, and well as the full source code.
> Let me know what you think.
>
> http://www.codebot.org/delphi/?doc=9568
>
> Here are two examples where multicast events to are benefiting me .
>
> 1) I have a SystemEvents singleton class that exposes multicast events to
> which other classes may connect. Events include OnFontChange,
> OnColorsChange, OnUserSwitch ... which fire when the system fonts or colors
> change etc.
>
> 2) I've written an application configuration class which can be edited while
> the program is running. This class exposes an OnChange multicast event which
> many other objects listen to and take action upon if they are interested in
> configuration changes, such as updating layout or visible options (
> http://imagebot.org/snapshops/edit-dialog.jpg).
Why did you not use the observer pattern as used in tiOPF ?
It does not need generics, and is well tested since a long time.
Michael.
More information about the fpc-pascal
mailing list