[fpc-devel] Interface delegation fix: backport to FPC 2.4.2 ...?
Marco van de Voort
marcov at stack.nl
Wed May 19 23:53:16 CEST 2010
In our previous episode, Michael Van Canneyt said:
> So - let's try another approach which may prove more constructive:
> What are your proposals to get some kind of observer pattern
> implemented so it can be applied consequently throughout the
> classes of the FCL and LCL, without duplicating all code or
> subclassing all existing classes ?
First: I don't see an urgent need for such draconic measures.
Second: I don't see a good solution, exactly because the whole framework was
not designed for this.
E.g. an Observer pattern typically uses interfaces, and interfaces are not
designed into the framework.
> I am not interested in the actual implementation of the observer
> pattern, just the means by which you think we can 'inject' one.
> Please don't bother questioning the need/desirability of
> this feature, consider it a given.
And that you call "constructive" ?
But anyway, I don't see any sane solution to inject it. Including proposed
ones modifying base classes.
That is the whole point. If you want this, start over, and do it properly.
More information about the fpc-devel