Great, I got this working now.
This is one small step better because the only string identifier used in code
for the interface is in the declaration itself so if the name of the interface
gets changed I'll get compiler warnings when I try to invoke it.
Thanks.
On Jul 26, 2012, at 8:41 AM, Lud
http://www.freepascal.org/docs-html/rtl/sysutils/supports.html
> I'm getting an identifier not found error with the procedure
> "Supports". Where is this defined?
>
>
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal
On Jul 26, 2012, at 2:32 AM, Graeme Geldenhuys wrote:
>
> You could also try the Supports() method. eg:
>
> if Supports(delegate, IMyInterface, intfDelegate) then
> intfDelegate.DoThis(1);
I'm getting an identifier not found error with the procedure "Supports". Where
is this defined?
>
On 24 July 2012 15:13, Ryan Joseph wrote:
> procedure InvokeDelegate (delegate: TObject);
> var
> intfDelegate: IMyInterface;
> begin
> ERROR > intfDelegate := IMyInterface(delegate);
> intfDelegate.DoThis(1);
> end;
You could also try the Supports() method. eg:
i
Now it works! That seems redundant to declare an identifier when the interface
name itself is unique. I would think the CORBA style identifier should default
to the name of the interface.
Thanks, I wanted this feature for a while now.
On Jul 24, 2012, at 5:56 PM, Luiz Americo Pereira Camara wro
Em 24/7/2012 20:17, Ryan Joseph escreveu:
I never heard of this syntax, is it Delphi only?
Trying this I got "Error: Interface type IMyInterface has no valid
GUID". What else do I need to do?
The sintaxe i posted is for COM interfaces.
For CORBA interfaces do
IMyInterface = interface
[
I never heard of this syntax, is it Delphi only?
Trying this I got "Error: Interface type IMyInterface has no valid GUID". What
else do I need to do?
Thanks.
On Jul 24, 2012, at 4:26 PM, Luiz Americo Pereira Camara wrote:
> if delegate.GetInterface(IMyInterface, intfDelegate) then
>intfD
Em 24/7/2012 11:13, Ryan Joseph escreveu:
I was asking on the Mac Pascal list if Delphi had any ways to invoke methods on
objects which the class was unknown at compile time (like a class that invokes
a user defined delegate commonly used in Cocoa Mac programming and I assume
Delphi not knowin
I was asking on the Mac Pascal list if Delphi had any ways to invoke methods on
objects which the class was unknown at compile time (like a class that invokes
a user defined delegate commonly used in Cocoa Mac programming and I assume
Delphi not knowing) and one user told me interfaces will work