[fpc-devel] Interface delegation fix: backport to FPC 2.4.2 ...?
michael at freepascal.org
michael at freepascal.org
Thu May 20 21:02:40 CEST 2010
> Michael Van Canneyt escreveu:
>>
>>
>> On Thu, 20 May 2010, Florian Klaempfl wrote:
>>
>>> I've no opinion if it's usefull to add or not, I use TPersistent+ too
>>> little but my concern is: if I create an observer for an instance, I'd
>>> expect to get notified about every change to the instance. But I cannot
>>> see how this will be achieved, no existing class is prepared for this?
>>
>> Not every change. What you get notified about is defined by the class
>> that uses the observable interface. TStrings will notify you of
>> additions/removals, and TList/TObjectList as well.
>
> It will send some kind of info (like index or address of the object) to
> know what and where the item was added or removed?
Yes.
>
> Can the same Obsever observe (:-D) more than of one type of object? e.g.
> i want to observe a object list for adding or removals, but also want to
> know if one of the child objects changed.
Yes. You can observe any object that will implement the IFPObservable
interface.
Michael.
More information about the fpc-devel
mailing list