[fpc-devel] Tests of observer feature [was: Considerations about observer]

Sven Barth pascaldragon at googlemail.com
Thu Nov 29 10:21:48 CET 2012


Am 29.11.2012 10:12, schrieb Marco van de Voort:
> In our previous episode, Sven Barth said:
>>> As is today, if you have a reference to a IFPObserver is not possible
>>> to use it to attach to, e.g., child objects. This occurs because AFAIK
>>> you can't get a TObject from a interface reference.
>> At least for COM interfaces "as" and "is" with a class type on the right
>> side is supported. The corresponding code for Corba interfaces is not
>> implemented (yet). This feature exists at least since 2.6.0.
> Also: You can get a tcomponent though, if you implement IInterfaceComponentreference
>
> TComponent implements this.
I haven't tested that, but does "SomeCorbaInterface as SomeCOMInterface" 
work? Because maybe the IInterfaceComponentReference trick would only 
work if the interface I'm working on is also a COM interface (because it 
could rely on the existence of QueryInterface)...

Regards,
Sven



More information about the fpc-devel mailing list