[fpc-pascal] Generic Observables

Michael Van Canneyt michael at freepascal.org
Thu May 2 21:34:58 CEST 2013



On Thu, 2 May 2013, Michal Wallace wrote:

> Hey all,
> I was experimenting with using some of FPC's features together and came up with this:
> https://github.com/tangentstorm/lazmvc/blob/master/umodel.pas
> 
> Basically, it's just a generic implementation of the Observer design pattern. It provides a class, TModel, tha you can use as an
> interface delegate to make any TObject into a subject. (You can also just subclass it.)

You are aware that the classes unit contains the observer pattern, and together with the fpmediators it has all you need
to implement the MVC model (through mediators) ?

I must admit though, that the use of message methods is very interesting.

Michael.



More information about the fpc-pascal mailing list