Re: [fpc-devel] Interfaces documentation suggestion

2009-08-11 Thread Graeme Geldenhuys
Michael Van Canneyt wrote: I will add a comment as you suggest. The documentation is meant to enlighten the user, not confuse him :-) :-) Thanks Michael. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ _

Re: [fpc-devel] Interfaces documentation suggestion

2009-08-11 Thread Michael Van Canneyt
On Mon, 10 Aug 2009, Graeme Geldenhuys wrote: Sergei Gorelkin wrote: "There are no visibility specifiers. All members are public (indeed, it would make little sense to make them private or protected)." This is about visibility of the methods/properties of

Re: [fpc-devel] Interfaces documentation suggestion

2009-08-11 Thread Michael Van Canneyt
On Mon, 10 Aug 2009, Graeme Geldenhuys wrote: Hi, Below is part of the Interfaces documentation. I disagree with the documentation mentioned below. Interfaces - section 7.1 http://lazarus-ccr.sourceforge.net/fpcdoc/ref/refse34.html#x77-850007.1 "There are

Re: [fpc-devel] Interfaces documentation suggestion

2009-08-10 Thread Graeme Geldenhuys
Sergei Gorelkin wrote: "There are no visibility specifiers. All members are public (indeed, it would make little sense to make them private or protected)." This is about visibility of the methods/properties of the interface itself. Do not confuse it with visi

Re: [fpc-devel] Interfaces documentation suggestion

2009-08-10 Thread Sergei Gorelkin
Graeme Geldenhuys wrote: Hi, Below is part of the Interfaces documentation. I disagree with the documentation mentioned below. Interfaces - section 7.1 http://lazarus-ccr.sourceforge.net/fpcdoc/ref/refse34.html#x77-850007.1 "There are no visibility specifiers

[fpc-devel] Interfaces documentation suggestion

2009-08-10 Thread Graeme Geldenhuys
Hi, Below is part of the Interfaces documentation. I disagree with the documentation mentioned below. Interfaces - section 7.1 http://lazarus-ccr.sourceforge.net/fpcdoc/ref/refse34.html#x77-850007.1 "There are no visibility specifiers. All members are public (

[fpc-devel] Interfaces

2008-08-16 Thread Jonas Maebe
Hello, I've just fixed http://bugs.freepascal.org/view.php?id=11862 which caused wrong methods of implemented interfaces to be called in some situations. However, while fixing it I first broke tests/webtbs/ tw3489.pp and after fixing that one tests/tbs/tb0485.pp didn't work anymore. Ever

Re: [fpc-devel] Interfaces vs. smartlink issue

2008-01-22 Thread Sergei Gorelkin
Peter Vreman wrote: It is legacy. You can improve it to put the wrappers for one interface definition in its own section. Looks like a one-line fix (see the attached patch). By the way, while testing it in Windows, I could not make the compiler do the smartlink with external linker. I compi

Re: [fpc-devel] Interfaces vs. smartlink issue

2008-01-21 Thread Peter Vreman
> Hello, > > I noticed that, within a unit, all interface wrappers (groups of > 'WRPR_*' symbols) are placed into one "assembler unit" together with > unit initialization/finalization code (sorry, do not know the exact term > for "assember unit"). > As a consequence, init/final code pulls in *all*

[fpc-devel] Interfaces vs. smartlink issue

2008-01-21 Thread Sergei Gorelkin
Hello, I noticed that, within a unit, all interface wrappers (groups of 'WRPR_*' symbols) are placed into one "assembler unit" together with unit initialization/finalization code (sorry, do not know the exact term for "assember unit"). As a consequence, init/final code pulls in *all* interface

Re: [fpc-devel] interfaces vs classes in dll

2007-12-03 Thread Michael Schnell
I suppose we are discussing the Delphi language keyword "interface" and it's implementation in free pascal. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

RE: [fpc-devel] interfaces vs classes in dll

2007-12-03 Thread Helmut Hartl
>> One advantage is that it can be easely used on many languages, >> althougth the usefulness of that for ideintf is probably very small. >> >I suppose you mean programming languages not spoken languages. >But Interface is a Delphi language keyword. I don't see what this has to with C or whate

Re: [fpc-devel] interfaces vs classes in dll

2007-12-03 Thread Michael Schnell
One advantage is that it can be easely used on many languages, althougth the usefulness of that for ideintf is probably very small. I suppose you mean programming languages not spoken languages. But Interface is a Delphi language keyword. I don't see what this has to with C or whatever.

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Felipe Monteiro de Carvalho
On Nov 30, 2007 10:12 AM, Michael Schnell <[EMAIL PROTECTED]> wrote: > What is the advantage of interfaces anyway (seems that I have been > missing something ... ) One advantage is that it can be easely used on many languages, althougth the usefulness of that for ideintf is probably very small. -

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Florian Klaempfl
Martin Schreiber schrieb: > On Friday 30 November 2007 11.23, Graeme Geldenhuys wrote: > >>> Delphi 7 is 10 times faster than FPC 2.2. >>> 8 seconds instead of 1min20 is better, don't you think? >> I'll bite. :-) >> What can I compile to do a speed comparison? How do I compile MSEgui >> under De

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Marco van de Voort
> On 30 Nov 2007, at 15:27, Marco van de Voort wrote: > > > Well, those are not numbers I'm interested in anyway. Sparc doesn't > > feature > > binwriter > > Why would the presence/absence of an integrated assembler make a > difference? Performance is not just CPU, but also disk and startup

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Jonas Maebe
On 30 Nov 2007, at 15:27, Marco van de Voort wrote: Well, those are not numbers I'm interested in anyway. Sparc doesn't feature binwriter Why would the presence/absence of an integrated assembler make a difference? At least make -j doesn't do any assembling in parallel with the rest whe

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Marco van de Voort
> Micha Nelissen schrieb: > > Florian Klaempfl wrote: > >> OTOH2, using no build unit but compiling with make -j is faster on multi > >> core systems. > > > > if (Micha==0) > multi_threaded_fpc=0; > else > multi_threaded_fpc++; Cough! ___ fp

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Marco van de Voort
> Marco van de Voort schrieb: > >> Florian Klaempfl schrieb: > >> OTOH, this might be solved indeed in the future by splitting the rtl. > >> OTOH2, using no build unit but compiling with make -j is faster on multi > >> core systems. > > > > Is it? Do you have numbers? > > I tested once on Paul Da

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Florian Klaempfl
Micha Nelissen schrieb: > Florian Klaempfl wrote: >> OTOH2, using no build unit but compiling with make -j is faster on multi >> core systems. > if (Micha==0) multi_threaded_fpc=0; else multi_threaded_fpc++; ___ fpc-devel maillist - fpc

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Florian Klaempfl
Marco van de Voort schrieb: >> Florian Klaempfl schrieb: >> OTOH, this might be solved indeed in the future by splitting the rtl. >> OTOH2, using no build unit but compiling with make -j is faster on multi >> core systems. > > Is it? Do you have numbers? I tested once on Paul Davidson's quad core

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Michael Van Canneyt
On Fri, 30 Nov 2007, Mattias Gaertner wrote: > On Fri, 30 Nov 2007 13:22:54 +0100 (CET) > Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > > > > > > On Fri, 30 Nov 2007, Paul Ishenin wrote: > > > > > Michael Van Canneyt wrote: > > > > No-one. The DLL must be recompiled anyway if you use pa

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Mattias Gaertner
On Fri, 30 Nov 2007 13:22:54 +0100 (CET) Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > > On Fri, 30 Nov 2007, Paul Ishenin wrote: > > > Michael Van Canneyt wrote: > > > No-one. The DLL must be recompiled anyway if you use packages. > > > And this is also true if you use interfaces, so usin

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Marco van de Voort
> Florian Klaempfl schrieb: > OTOH, this might be solved indeed in the future by splitting the rtl. > OTOH2, using no build unit but compiling with make -j is faster on multi > core systems. Is it? Do you have numbers? ___ fpc-devel maillist - fpc-deve

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Michael Van Canneyt
On Fri, 30 Nov 2007, Paul Ishenin wrote: > Michael Van Canneyt wrote: > > No-one. The DLL must be recompiled anyway if you use packages. > > And this is also true if you use interfaces, so using interfaces > > will not solve the problem you mention. > > > Only if compiler (who provides packag

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Micha Nelissen
Florian Klaempfl wrote: OTOH2, using no build unit but compiling with make -j is faster on multi core systems. multi_threaded_fpc++ :-) Micha ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-d

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Florian Klaempfl
Florian Klaempfl schrieb: > Micha Nelissen schrieb: >> Florian Klaempfl wrote: >>> Micha Nelissen schrieb: Well, the best optimization is not needing to do something at all ;-). >>> So you see a way to do make cycle in one compiler call ;)? >> Obviously not the three cycles, but maybe one cycl

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Micha Nelissen
Florian Klaempfl wrote: Well, problem is that then not all units are build and you don't want to pull in variants etc. into the compiler :) rtl_extra++ :-) Micha ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/ma

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Paul Ishenin
Michael Van Canneyt wrote: No-one. The DLL must be recompiled anyway if you use packages. And this is also true if you use interfaces, so using interfaces will not solve the problem you mention. Only if compiler (who provides package system) changed. Ide changes will not cause recompilation o

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Florian Klaempfl
Micha Nelissen schrieb: > Florian Klaempfl wrote: >> Micha Nelissen schrieb: >>> Well, the best optimization is not needing to do something at all ;-). >> >> So you see a way to do make cycle in one compiler call ;)? > > Obviously not the three cycles, but maybe one cycle could be done by not > co

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Micha Nelissen
Florian Klaempfl wrote: Micha Nelissen schrieb: Well, the best optimization is not needing to do something at all ;-). So you see a way to do make cycle in one compiler call ;)? Obviously not the three cycles, but maybe one cycle could be done by not compiling the RTL, but by starting to co

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Florian Klaempfl
Micha Nelissen schrieb: > Florian Klaempfl wrote: >>> 8 seconds instead of 1min20 is better, don't you think? >> >> Oh great, please tell me how you accelerated make and process start >> times. > > Well, the best optimization is not needing to do something at all ;-). > So you see a way to do ma

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Martin Schreiber
On Friday 30 November 2007 11.23, Graeme Geldenhuys wrote: > > Delphi 7 is 10 times faster than FPC 2.2. > > 8 seconds instead of 1min20 is better, don't you think? > > I'll bite. :-) > What can I compile to do a speed comparison? How do I compile MSEgui > under Delphi 7? > http://www.mail-archi

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Michael Schnell
I even do have that book right behind me on the shelf. Silly me should have looked there :(. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Marco van de Voort
[ Charset ISO-8859-1 unsupported, converting... ] > On Friday 30 November 2007 11.22, Florian Klaempfl wrote: > > > I forgot to mention that the Delphi 'implements' keyword > > > > FPC supports this? Thought some bugs are known iirc. > > > Is the following from Delphi 7 help possible with FPC? int

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Vincent Snijders
Marc Weustink schreef: Vincent Snijders wrote: Michael Van Canneyt schreef: I find classes more natural than interfaces. It 'just works'. Not so with interfaces, because you must do a typecast every time. Compare Function GetPluginInterface : ISOmeThing; begin X:=MyPluginObjectXYZ.Creat

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Martin Schreiber
On Friday 30 November 2007 11.22, Florian Klaempfl wrote: > > I forgot to mention that the Delphi 'implements' keyword > > FPC supports this? Thought some bugs are known iirc. > Is the following from Delphi 7 help possible with FPC? " If the delegate property is of a class type, that class and its

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Michael Schnell
OK, Thanks, -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Marc Weustink
Vincent Snijders wrote: Michael Van Canneyt schreef: I find classes more natural than interfaces. It 'just works'. Not so with interfaces, because you must do a typecast every time. Compare Function GetPluginInterface : ISOmeThing; begin X:=MyPluginObjectXYZ.Create; Result:=X as ISomet

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Vincent Snijders
Michael Van Canneyt schreef: I find classes more natural than interfaces. It 'just works'. Not so with interfaces, because you must do a typecast every time. Compare Function GetPluginInterface : ISOmeThing; begin X:=MyPluginObjectXYZ.Create; Result:=X as ISomething; end; This is then

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Graeme Geldenhuys
On 30/11/2007, Florian Klaempfl <[EMAIL PROTECTED]> wrote: > > This works iirc too? That's what I remember as well Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: > On 30/11/2007, Florian Klaempfl <[EMAIL PROTECTED]> wrote: >>> and the interface >>> method resolution clauses would be useful too. >> What this? >> > > > I think he means when a class implements a inferfaces and somewhere in > the class hierarchy, there already exist

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Graeme Geldenhuys
On 30/11/2007, Florian Klaempfl <[EMAIL PROTECTED]> wrote: > > > and the interface > > method resolution clauses would be useful too. > > What this? > I think he means when a class implements a inferfaces and somewhere in the class hierarchy, there already exists a method with the same name. You

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Michael Van Canneyt
On Fri, 30 Nov 2007, Paul Ishenin wrote: > Michael Van Canneyt wrote: > > > > > Classes: > > > > - No reference counting mess. - Easier to grasp conceptually. > > > > > > > In plugin dll? > > > > Sure. Why not ? Obviously, the DLL needs to use packages, but that is > > understood. > > I me

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Micha Nelissen
Florian Klaempfl wrote: 8 seconds instead of 1min20 is better, don't you think? Oh great, please tell me how you accelerated make and process start times. Well, the best optimization is not needing to do something at all ;-). Micha ___ fpc-devel ma

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Jonas Maebe
On 30 Nov 2007, at 11:49, Martin Schreiber wrote: Delphi 7 is 10 times faster than FPC 2.2. 8 seconds instead of 1min20 is better, don't you think? That very much depends on the trade-offs. If there are none: fine. However, if it requires to go back to a compiler design similar to that of

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Graeme Geldenhuys
On 30/11/2007, Martin Schreiber <[EMAIL PROTECTED]> wrote: > > > I forgot to mention that the Delphi 'implements' keyword and the interface > method resolution clauses would be useful too. > Aren't those already supported in FPC 2.2.0? I thought 'implements' was around some some time now. > > D

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Florian Klaempfl
Martin Schreiber schrieb: > On Friday 30 November 2007 09.59, Florian Klaempfl wrote: >> Martin Schreiber schrieb: > http://www.freepascal.org/mantis/view.php?id=6036 It doesn't look like that is going to be fixed any time soon. It was reported in 2005-06-14 and still hasn't even been

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Graeme Geldenhuys
On 30/11/2007, Michael Schnell <[EMAIL PROTECTED]> wrote: > > > What is the advantage of interfaces anyway (seems that I have been > missing something ... ) > Many others have answered this already, so I'm not going to type out the answer. Instead, I'll just quote some of them This should gi

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Martin Schreiber
On Friday 30 November 2007 09.59, Florian Klaempfl wrote: > Martin Schreiber schrieb: > >>> http://www.freepascal.org/mantis/view.php?id=6036 > >> > >> It doesn't look like that is going to be fixed any time soon. It was > >> reported in 2005-06-14 and still hasn't even been acknowledged! > > I've

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Michael Schnell
Since I assume the DLL use is the scenario that is wanted, it de facto means that you must use widestrings. What about old fashioned PChar ? Everybody using the Windows and Linux APIs is used to that. -Michael ___ fpc-devel maillist - fpc-deve

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Daniël Mantione
Op Fri, 30 Nov 2007, schreef Martin Schreiber: > On Friday 30 November 2007 10.26, Michael Van Canneyt wrote: > > > > When you pass an interface that uses ansistrings to a DLL, > > the ansistrings in it (or referenced by it) may be disposed > > of by the wrong memory manager. > > > > Since I ass

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Martin Schreiber
On Friday 30 November 2007 10.26, Michael Van Canneyt wrote: > > When you pass an interface that uses ansistrings to a DLL, > the ansistrings in it (or referenced by it) may be disposed > of by the wrong memory manager. > > Since I assume the DLL use is the scenario that is wanted, > it de facto me

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Paul Ishenin
Michael Van Canneyt wrote: Classes: - No reference counting mess. - Easier to grasp conceptually. In plugin dll? Sure. Why not ? Obviously, the DLL needs to use packages, but that is understood. I mean what is easier to grasp conceptually when you use class in dll instead of interface?

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Michael Van Canneyt
On Fri, 30 Nov 2007, Paul Ishenin wrote: > > > Michael Van Canneyt пишет: > > On Thu, 29 Nov 2007, Mattias Gaertner wrote: > > > > > > > Lazarus has the IDEIntf, the API for IDE plugins. > > > > > > What is better in this case: classes or interfaces? > > > > > > > Classes: > > - No ref

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Marco van de Voort
> > What is better in this case: classes or interfaces? > > > What is the advantage of interfaces anyway (seems that I have been > missing something ... ) A limited form of multiple inheritance. > I _thought_ it would be reference counting, but in the other thread > someone wants to (and do

Re: [fpc-devel] interfaces vs classes in dll

2007-11-30 Thread Michael Schnell
What is better in this case: classes or interfaces? What is the advantage of interfaces anyway (seems that I have been missing something ... ) I _thought_ it would be reference counting, but in the other thread someone wants to (and does) use Interfaces without reference counting. -Mich

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-30 Thread Florian Klaempfl
Martin Schreiber schrieb: >>> http://www.freepascal.org/mantis/view.php?id=6036 >> It doesn't look like that is going to be fixed any time soon. It was >> reported in 2005-06-14 and still hasn't even been acknowledged! I've no clue how it is supposed to work :) >> > :-) > Reference counted widest

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Martin Schreiber
On Friday 30 November 2007 08.21, Graeme Geldenhuys wrote: > On 30/11/2007, Martin Schreiber <[EMAIL PROTECTED]> wrote: > > tnullinterfacedobject is needed in MSEgui for Delphi compatibility > > because Delphi has no corba style interfaces. > > So basically you want to use interfaces without refere

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 30/11/2007, Martin Schreiber <[EMAIL PROTECTED]> wrote: > > > tnullinterfacedobject is needed in MSEgui for Delphi compatibility because > Delphi has no corba style interfaces. So basically you want to use interfaces without reference counting. What other benefits did you see to make you decide

Re: [fpc-devel] interfaces vs classes in dll

2007-11-29 Thread Paul Ishenin
Michael Van Canneyt пишет: On Thu, 29 Nov 2007, Mattias Gaertner wrote: Lazarus has the IDEIntf, the API for IDE plugins. What is better in this case: classes or interfaces? Classes: - No reference counting mess. - Easier to grasp conceptually. In plugin dll? - You can use an

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Martin Schreiber
On Thursday 29 November 2007 11.52, Graeme Geldenhuys wrote: > > > > Also, do I have to specify {$Interfaces Corba} in every unit I have, > > > or is it only needed in the using that defines the interface itself? > > You need. See eg MSE units. > The {$interfaces corba} in every MSEgui unit is bec

Re: [fpc-devel] interfaces vs classes in dll

2007-11-29 Thread Michael Van Canneyt
On Thu, 29 Nov 2007, Mattias Gaertner wrote: > Lazarus has the IDEIntf, the API for IDE plugins. > > What is better in this case: classes or interfaces? Classes: - No reference counting mess. - Easier to grasp conceptually. - You can use ansistrings. Interfaces require widestrings. (olestring

Re: [fpc-devel] interfaces vs classes in dll

2007-11-29 Thread Marc Weustink
Mattias Gaertner wrote: Lazarus has the IDEIntf, the API for IDE plugins. What is better in this case: classes or interfaces? What if someday there are packages? What if someday there is a closed source dll plugin? 3x Interfaces (you need a shared memmanager in this case) Additional advantag

[fpc-devel] interfaces vs classes in dll

2007-11-29 Thread Mattias Gaertner
Lazarus has the IDEIntf, the API for IDE plugins. What is better in this case: classes or interfaces? What if someday there are packages? What if someday there is a closed source dll plugin? Mattias ___ fpc-devel maillist - fpc-devel@lists.freepasca

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Marc Weustink
Thorsten Engler wrote: IMO borland screwed up here when they introduced IInterface = IUnknown. No they didn't. IMO :) It was IMo cleaner (and you can mix interface types) There are no different "types" of interfaces in Delphi/Kylix. Even if there were (like there are in FPC) you can never e

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Michael Schnell
An "as" cast from object to interface is only allowed (at least in Delphi) if the compiler can statically at compiletime determine that the type of the AObject variable implements that interface. Ouups is "as" used differently with interfaces than with objects ? With Objects "as" does a typeca

RE: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Thorsten Engler
> IMO borland screwed up here when they introduced IInterface = > IUnknown. No they didn't. > It was IMo cleaner (and you can mix interface types) There are no different "types" of interfaces in Delphi/Kylix. Even if there were (like there are in FPC) you can never ever mix them. > when they de

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Marc Weustink <[EMAIL PROTECTED]> wrote: > > However cmd := ins; should work. > Finally I can get my example code to compile and run correctly! Thanks Marc. I also tried the above where TAddCommand implements two interfaces. It works as well. Regards, - Graeme -

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Marc Weustink <[EMAIL PROTECTED]> wrote: > > type >IInterface = interface >end; > >IUnknown = interface(IInterface) > _addref... > _release > Query >end; After all these messages, that does seem like the better solution. Regards, - Graeme -

RE: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Thorsten Engler
> > AObject as ICorbaInterface ? > > And how does the underlying code do the lookup in the > interfaces table? There is no "lookup" required for this. An "as" cast from object to interface is only allowed (at least in Delphi) if the compiler can statically at compiletime determine that the type

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Marc Weustink <[EMAIL PROTECTED]> wrote: > > I only know that a corba interface needs to be identified somehow > otherwise it cant be looked up. (which can't atm) > Be it through GUID, name or vtm. > So based on all these discussions on Corba interfaces, I can only make one conclusi

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Marc Weustink
Graeme Geldenhuys wrote: On 29/11/2007, Marc Weustink <[EMAIL PROTECTED]> wrote: http://www.freepascal.org/mantis/view.php?id=6798 I can confirm that this doesn't work {$Interfaces Corba} var cmd: ICommand; holder: ICommandHolder; ins: TAddCommand; begin ins := TAddCommand.Crea

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Marc Weustink
Micha Nelissen wrote: Marc Weustink wrote: Micha Nelissen wrote: Marc Weustink wrote: How would you get a corba interface from a class where this class implements one or more corba interfaces ? They somehow need to be identified. AObject as ICorbaInterface ? And how does the underlying co

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Micha Nelissen
Marc Weustink wrote: Micha Nelissen wrote: Marc Weustink wrote: How would you get a corba interface from a class where this class implements one or more corba interfaces ? They somehow need to be identified. AObject as ICorbaInterface ? And how does the underlying code do the lookup in the

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Marc Weustink <[EMAIL PROTECTED]> wrote: > http://www.freepascal.org/mantis/view.php?id=6798 I can confirm that this doesn't work {$Interfaces Corba} var cmd: ICommand; holder: ICommandHolder; ins: TAddCommand; begin ins := TAddCommand.Create(memName1); ins.GetInte

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Marc Weustink
Micha Nelissen wrote: Marc Weustink wrote: How would you get a corba interface from a class where this class implements one or more corba interfaces ? They somehow need to be identified. AObject as ICorbaInterface ? And how does the underlying code do the lookup in the interfaces table? Ma

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Micha Nelissen
Marc Weustink wrote: How would you get a corba interface from a class where this class implements one or more corba interfaces ? They somehow need to be identified. AObject as ICorbaInterface ? Micha ___ fpc-devel maillist - fpc-devel@lists.freepa

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Marc Weustink
Micha Nelissen wrote: Graeme Geldenhuys wrote: type ICommand = interface ['{28D72102-D883-41A1-9585-D86B24D9C628}'] procedure Execute; end; What is the point of defining a GUID for a non-COM interface? How would you get a corba interface from a class where this class implements

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Marc Weustink
Graeme Geldenhuys wrote: On 29/11/2007, Thorsten Engler <[EMAIL PROTECTED]> wrote: to another interface implemented by the same object (Or back to the object for that matter). I guess to get back to the Obj instance, you could let your ISomething interface implement "function Instance" which r

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: > > I read in a message thread from 2005 that when you use Corba style > interfaces, interfaces are also not allowed to inherit from each > other. Is this correct? If that is supposed to be true, then we have a problem in FPC 2.2.0 I've

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Vincent Snijders
Sergei Gorelkin schreef: Graeme Geldenhuys wrote: Beats me, I thought that might be needed for querying a object for interfaces it supports... As far as CORBA is concerned, I'm just shooting in the dark here... Information on CORBA usage is limited and I can't find any FPC code examples to gi

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Sergei Gorelkin <[EMAIL PROTECTED]> wrote: > > > Think of Corba-styled interfaces as about "interfaces without COM glue", > not just as about "interfaces without refcounting". To get runtime > typecasting features, you have to implement it yourself. OTOH, you are > free to implement

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Sergei Gorelkin
Graeme Geldenhuys wrote: Beats me, I thought that might be needed for querying a object for interfaces it supports... As far as CORBA is concerned, I'm just shooting in the dark here... Information on CORBA usage is limited and I can't find any FPC code examples to give me hints. It seems qui

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Thorsten Engler <[EMAIL PROTECTED]> wrote: > > You can assign from an object to a (non-COM) interface variable: > > var > Obj: TSomeObject; > Intf: ISomeInterface; > begin > ... > Intf := Obj as ISomeInterface; [ I can't find the message I just sent in my Outbox, so here i

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Micha Nelissen <[EMAIL PROTECTED]> wrote: > > type > > ICommand = interface > > ['{28D72102-D883-41A1-9585-D86B24D9C628}'] > > procedure Execute; > > end; > > What is the point of defining a GUID for a non-COM interface? > Beats me, I thought that might be needed for que

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Thorsten Engler <[EMAIL PROTECTED]> wrote: > to another interface implemented by the same object (Or back to the object > for that matter). I guess to get back to the Obj instance, you could let your ISomething interface implement "function Instance" which returns the Obj instance.

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Micha Nelissen
Graeme Geldenhuys wrote: type ICommand = interface ['{28D72102-D883-41A1-9585-D86B24D9C628}'] procedure Execute; end; What is the point of defining a GUID for a non-COM interface? Micha ___ fpc-devel maillist - fpc-devel@lists.freepasca

RE: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Thorsten Engler
> I then wrote the following code to see if I could query for a > supported interface. > > ... > Well, the 'It worked' never appears and the cmd.Execute is > never fired, so it's still a mystery how CORBA interfaces > work. I'll see if Delphi help maybe mentions something. You can assign fr

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Joao Morais <[EMAIL PROTECTED]> wrote: > > Any class. Afaik corba interfaces doesn't implement a method ? > OK, I wrote a quick test app. Added {$Interfaces Corba} in each unit just to be save. I declared two interfaces as follows: type ICommand = interface ['{28D72102-D883-

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Graeme Geldenhuys
On 29/11/2007, Joao Morais <[EMAIL PROTECTED]> wrote: > > > ICommand = interface > > Under $interfaces com, interface = interface(iunknown) That much I figured, but the question is what does 'interface' default to if Corba style interfaces are used? > > 1. implement _addref, _release and Quer

Re: [fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-29 Thread Joao Morais
Graeme Geldenhuys wrote: So what do I use to create interfaces and classes that implement interfaces? Which declaration style do I use? Or doesn't it make a difference? type ICommand = interface(IInterface) vs ICommand = interface(IUnkown) They are exactly the same ? (D<=5 and D>=6 comp

[fpc-devel] {$Interfaces Corba} and TInterfacedObject

2007-11-28 Thread Graeme Geldenhuys
Hi, I previously asked what is the difference between the supported $Interfaces types. eg: Corba vs COM. >From those replies, they are very much the same, except that Corba interfaces are NOT reference counted. So what do I use to create interfaces and classes that implement interfaces? Which dec

[fpc-devel] Interfaces (long post)

2006-06-03 Thread Leonardo M. Ram
I'm trying to port a program i wrote in Delphi to FPC & Kylix and found when an interfaced object (COM interface, not CORBA) is instantiated and call the _AddRef method, in Kylix is executed one time (as expected) but in FPC is called two times losing the refcount. The correct result is this (co