[fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Graeme Geldenhuys
Hi, Below is an example of two interfaces I declared. Trying to implement them on a TObject subclass, I got a compiler error that IUnkown was not implemented in my subclass. In all units I defined {$interfaces corba} Eventually I found out that I had to remove the (IInterface) heritage from my in

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Sven Barth
On 14.11.2010 11:52, Graeme Geldenhuys wrote: Hi, Below is an example of two interfaces I declared. Trying to implement them on a TObject subclass, I got a compiler error that IUnkown was not implemented in my subclass. In all units I defined {$interfaces corba} Eventually I found out that I ha

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Graeme Geldenhuys
On 14 November 2010 13:03, Sven Barth wrote: > > It's Delphi compatible: > http://docwiki.embarcadero.com/VCL/XE/en/System.IInterface > > So yes, it seems to be a COM interface even in Delphi 7+ (I don't know about > Kylix though). I don't know that the latest Embarcadero docs say, but IInterface

[fpc-pascal] Is it posible to implement more than one interface in a class defination?

2010-11-14 Thread yu ping
For example if there are two Interface : IinterfaceA,IinterfaceB can I implement these two interface in one class? Thanks pingyu ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.o

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Sven Barth
On 14.11.2010 13:03, Graeme Geldenhuys wrote: On 14 November 2010 13:03, Sven Barth wrote: It's Delphi compatible: http://docwiki.embarcadero.com/VCL/XE/en/System.IInterface So yes, it seems to be a COM interface even in Delphi 7+ (I don't know about Kylix though). I don't know that the lat

Re: [fpc-pascal] Is it posible to implement more than one interface in a class defination?

2010-11-14 Thread Sven Barth
On 14.11.2010 13:08, yu ping wrote: For example if there are two Interface : IinterfaceA,IinterfaceB can I implement these two interface in one class? Yes, you can. Take the following example: type IInterfaceA = interface procedure A; end; IInterfaceB = interface procedure B

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Graeme Geldenhuys
On 14 November 2010 14:18, Sven Barth wrote: > IInterface and IUnknown are the same in Delphi 7 as well as they are in FPC > (although they are aliased the other way round, but that doesn't matter). So then comes the big question — why have IInterface then, if it is exactly the same as IUnknown,

Re: [fpc-pascal] Is it posible to implement more than one interface in a class defination?

2010-11-14 Thread Graeme Geldenhuys
On 14 November 2010 14:08, yu ping wrote: >  For example if there are two Interface : IinterfaceA,IinterfaceB >  can I implement these two interface in one class? Yes you can, but be warned, Interfaces doesn't seem to be a high priority feature in FPC - I don't think many here use Interfaces. Ther

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Sven Barth
On 14.11.2010 14:16, Graeme Geldenhuys wrote: On 14 November 2010 14:18, Sven Barth wrote: IInterface and IUnknown are the same in Delphi 7 as well as they are in FPC (although they are aliased the other way round, but that doesn't matter). So then comes the big question — why have IInterface

Re: [fpc-pascal] MSEide+MSEgui rev.2.4

2010-11-14 Thread Paul Breneman
Martin Schreiber wrote: Hi, MSEide+MSEgui version 2.4 for FPC 2.4.2 has been released: https://developer.berlios.de/project/showfiles.php?group_id=11520 Questions and bug reports please to mailing list: https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk NNTP gateway: nntp://news.gmane.

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Graeme Geldenhuys
On 14 November 2010 15:36, Sven Barth wrote: > > Ask Borland why they decided to do it that way... perhaps they wanted a > common ancestor for they case they ever decide to use non COM interfaces... > (I can only guess here) This is exactly what I am saying IInterface is a non-COM interface in Ky

Re: [fpc-pascal] MSEide+MSEgui rev.2.4

2010-11-14 Thread Marco van de Voort
In our previous episode, Paul Breneman said: > > This is a new page with FPC 2.4.2 and fpGUI: >http://www.turbocontrol.com/easyfpgui.htm > > I'd like to set up a similar page for MSEgui (and maybe for MSEide as > well). Please contact me off-list about this. Btw, you might want to scrap th

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > This is exactly what I am saying IInterface is a non-COM interface in > Kylix Please leave IInterface alone. It took me a week of work to let the current IInterface=IUnknown alias propagate properly in fpdoc's internal structures :-) ___

[fpc-pascal] Re: MSEide+MSEgui rev.2.4

2010-11-14 Thread Martin Schreiber
Paul Breneman wrote: > > I'd like to set up a similar page for MSEgui (and maybe for MSEide as > well). Please contact me off-list about this. Done. Martin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailm

Re: [fpc-pascal] MSEide+MSEgui rev.2.4

2010-11-14 Thread Paul Breneman
Marco van de Voort wrote: In our previous episode, Paul Breneman said: This is a new page with FPC 2.4.2 and fpGUI: http://www.turbocontrol.com/easyfpgui.htm I'd like to set up a similar page for MSEgui (and maybe for MSEide as well). Please contact me off-list about this. Btw, you might

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Sven Barth
On 14.11.2010 14:58, Marco van de Voort wrote: In our previous episode, Graeme Geldenhuys said: This is exactly what I am saying IInterface is a non-COM interface in Kylix Please leave IInterface alone. It took me a week of work to let the current IInterface=IUnknown alias propagate properly i

[fpc-pascal] When do I need a component rather than a plain object?

2010-11-14 Thread Frank Church
Does TObject have all the capabilities of TComponent apart from things like streaming and being used from the IDE component palette? I want to create an object which has all the capabilities like getting and setting properties, and I want to know whether I need to inherit from TObject or from some

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Graeme Geldenhuys
On 14 November 2010 15:58, Marco van de Voort wrote: > > Please leave IInterface alone. It took me a week of work to let the current > IInterface=IUnknown alias propagate properly in fpdoc's internal structures > :-) :-) I can't say I saw that one coming. -- Regards,   - Graeme - _

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Graeme Geldenhuys
On 14 November 2010 17:25, Sven Barth wrote: > Besides think about the following: > > Let's say IInterface would be changed to be the base ancestor type for Corba > interfaces. What about existing classes that implement IInterface (which > currently declares QueryInterface, AddRef and Release, caus

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: FPC's designs should stay logical and clean, and it's up to the developers to maintain their application code and fixe such bad/broken code. ... and as soon as we do such a logical decision, you start whining, whining about the bad fpc developers destroying your b

Re: [fpc-pascal] Is it posible to implement more than one interface in a class defination?

2010-11-14 Thread Graeme Geldenhuys
Hi Everybody, On 14 November 2010 16:31, Jonas Maebe wrote: > Please don't spread FUD. There are several projects that make heavy use of > interfaces that work fine with FPC (e.g. Zeoslib). Yes, interface delegation > is not finished (other than that, interfaces work fine afaik) Let me just clari

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Sven Barth
On 14.11.2010 17:30, Graeme Geldenhuys wrote: On 14 November 2010 17:25, Sven Barth wrote: Besides think about the following: Let's say IInterface would be changed to be the base ancestor type for Corba interfaces. What about existing classes that implement IInterface (which currently declares

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Graeme Geldenhuys
On 14 November 2010 18:44, Florian Klaempfl wrote: > > ... and as soon as we do such a logical decision, you start whining, whining > about the bad fpc developers destroying your business plans. Bo hoo... It's called being able to maintain code in the long run. Keep adding one hack after the next

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: On 14 November 2010 18:44, Florian Klaempfl wrote: ... and as soon as we do such a logical decision, you start whining, whining about the bad fpc developers destroying your business plans. Bo hoo... It's called being able to maintain code in the long run. Oh, I for

Re: [fpc-pascal] Is it posible to implement more than one interface in a class defination?

2010-11-14 Thread Sven Barth
On 14.11.2010 17:49, Graeme Geldenhuys wrote: * incomplete delegation (non existent in FPC 2.4.2) I haven't used this for quite a long time, so I can't test it just now... what are you missing? * No name resolution (function aliases) of conflicting interfaces Ehhh... the following

Re: [fpc-pascal] Is it posible to implement more than one interface in a class defination?

2010-11-14 Thread Florian Klaempfl
Sven Barth schrieb: * No name resolution (function aliases) of conflicting interfaces Ehhh... the following code compiles with 2.4.2 and even 2.4.0: Typical FUD tactics: mix something people know being true with something wrong and they believe you the wrong statement. var t: TMyInt

Re: [fpc-pascal] Is it posible to implement more than one interface in a class defination?

2010-11-14 Thread Sven Barth
On 14.11.2010 18:17, Florian Klaempfl wrote: var t: TMyInterfacedObject; i: IMyInterface; begin t := TMyInterfacedObject.Create; try i := t; t.Foo; i.Foo; finally t.Free; end; end. source end Output is: output begin Foo Bar An unhandled exception occurred at $08056B71 : EI

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Martin Schreiber
On Sunday, 14. November 2010 17.30:13 Graeme Geldenhuys wrote: > Under all other OSes, (which don't have COM), FPC should default to > CORBA style interfaces, where IInterface is non-COM - same as what was > done in Kylix. What's the point of have COM style interface on > non-Windows platforms any

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Matt Emson
On 14 Nov 2010, at 13:16, Graeme Geldenhuys wrote: > On 14 November 2010 14:18, Sven Barth wrote: >> IInterface and IUnknown are the same in Delphi 7 as well as they are in FPC >> (although they are aliased the other way round, but that doesn't matter). > > > So then comes the big question — wh

Re: [fpc-pascal] Is it posible to implement more than one interface in a class defination?

2010-11-14 Thread Graeme Geldenhuys
On 14 November 2010 19:11, Sven Barth wrote: >>    * No name resolution (function aliases) of conflicting interfaces > > Ehhh... the following code compiles with 2.4.2 and even 2.4.0: My apologies then, I must not have seen the announcement. I also looked in my ref.pdf (which was incidentally in

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Graeme Geldenhuys
On 14 November 2010 19:49, Martin Schreiber wrote: >> > Reference counted interfaces need compiler magic AFAIK. Indeed, you are correct. -- Regards,   - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net:8080/

Re: [fpc-pascal] Corba Interfaces and IInterface query

2010-11-14 Thread Graeme Geldenhuys
On 14 November 2010 19:45, Matt Emson wrote: > methods. We used them much as one would with in .Net these days. More about > light public interfaces, encapsulation and delegation rather than ref > counting and such. This is how I use interfaces too. I never to COM programming as such, but do you

Re: [fpc-pascal] When do I need a component rather than a plain object?

2010-11-14 Thread Michael Van Canneyt
On Sun, 14 Nov 2010, Frank Church wrote: Does TObject have all the capabilities of TComponent apart from things like streaming and being used from the IDE component palette? I want to create an object which has all the capabilities like getting and setting properties, and I want to know whe

Re: [fpc-pascal] Is it posible to implement more than one interface in a class defination?

2010-11-14 Thread Andrew Hall
I suspect the reason is that the object still has a refCount of 1 when you free it and this code raises the exception: procedure TInterfacedObject.BeforeDestruction; begin if frefcount<>0 then HandleError(204); end; You should never free an interfaced object di

[fpc-pascal] Re: [admin] List moderation (was: Is it posible to implement more than one interface in a class defination?)

2010-11-14 Thread Jonas Maebe
On 14 Nov 2010, at 17:49, Graeme Geldenhuys wrote: > By all means, if it will make you feel > better/happier, then why not simply unsubscribe or band my from all > FPC and Lazarus related mailing lists while you are at it. It has nothing to do with with how I feel, although I can't say that I a

Re: [fpc-pascal] Is it posible to implement more than one interface in a class defination?

2010-11-14 Thread Andrew Hall
FWIW, both interface delegation ("implements") and "method aliasing" have been supported in FPC for at least 2 years (we first tested/used them in January 2009 with FPC 2.2.2 which was released in August 2008). * We have used method aliasing extensively - it appears to behave the same as Bor