Re: [fpc-pascal] Dynamic messaging in Delphi

2012-07-24 Thread Luiz Americo Pereira Camara
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 [

Re: [fpc-pascal] Dynamic messaging in Delphi

2012-07-24 Thread Ryan Joseph
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

Re: [fpc-pascal] Dynamic messaging in Delphi

2012-07-24 Thread Luiz Americo Pereira Camara
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

[fpc-pascal] Dynamic messaging in Delphi

2012-07-24 Thread Ryan Joseph
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

Re: [fpc-pascal] Re: UnicodeString comparison performance

2012-07-24 Thread Sven Barth
Am 24.07.2012 13:21, schrieb OBones: Thomas Schatzl wrote: This code is not thread safe at all. A thread switch after the while loop and before the increment will not prevent progress on other threads, so multiple threads can enter the "critical section". Well, yes, even if under Windows it's r

Re: [fpc-pascal] Re: UnicodeString comparison performance

2012-07-24 Thread OBones
Thomas Schatzl wrote: This code is not thread safe at all. A thread switch after the while loop and before the increment will not prevent progress on other threads, so multiple threads can enter the "critical section". Well, yes, even if under Windows it's rare that a thread is preempted right i

Re: [fpc-pascal] Re: UnicodeString comparison performance

2012-07-24 Thread Thomas Schatzl
HI, On Mon, 2012-07-23 at 16:58 +0200, OBones wrote: > Jonas Maebe wrote: > > On 23 Jul 2012, at 10:58, OBones wrote: > > > >> leledumbo wrote: > >>> I look at the generated code and in the direct one there's additional > >>> overhead of decrementing the reference counter on each iteration. > >> I