[fpc-devel] Interface delegation fix: backport to FPC 2.4.2 ...?

Michael Van Canneyt michael at freepascal.org
Thu May 20 12:14:49 CEST 2010



On Thu, 20 May 2010, Florian Klaempfl wrote:

> Michael Van Canneyt schrieb:
>>
>>
>> On Thu, 20 May 2010, Florian Klaempfl wrote:
>>
>>> michael.vancanneyt at wisa.be schrieb:
>>>>
>>>> I need a solution that works with current GUI, current libraries and
>>>> whatnot. What you propose is re-doing the work of 10 years, which is
>>>> obviously not feasable.
>>>
>>> Can you give a real world example what you want to do with it?
>>
>> Like I said, observe TMemo.Strings for changes.
>
> Doesn't the OnChange event solve this for gui classes already?

Yes, but it is too primitive. We need a unified interface, universally 
applicable.

>> Not every change. What you get notified about is defined by the class
>> that uses the observable interface.
>
> Is this still an observer then?

Of course. It observes changes. When you look at a thermometer, you
don't expect to be notified that it's color changes (through age), 
but just that the temperature changes :-)

>
>> and TList/TObjectList as well.
>
> They are no TPersistent descendents.

I know, but they will expose the same interface as TPersistent.

Michael.



More information about the fpc-devel mailing list