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] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Daniël Mantione
Op Thu, 29 Nov 2007, schreef Alvise Nicoletti: > I added a /usr/lib32 link to the fpc.cfg, however I have no "crti.o" in the > /usr/lib32/ folder. > I got the same error trying to cross-compile to a i386 target. > > /usr/lib/crti.o is a "ELF 64-bit LSB relocatable, AMD x86-64, version 1 > (SYSV

Re: [fpc-devel] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Alvise Nicoletti
Marc Weustink ha scritto: Alvise Nicoletti wrote: Marc Weustink ha scritto: Alvise Nicoletti wrote: Daniël Mantione ha scritto: Op Thu, 29 Nov 2007, schreef Alvise Nicoletti: Yes, I have the packages needed to open a 32 bit file in my 64 bits distro (ubuntu-server): . linux32 ia32-libs l

Re: [fpc-devel] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Marc Weustink
Alvise Nicoletti wrote: Marc Weustink ha scritto: Alvise Nicoletti wrote: Daniël Mantione ha scritto: Op Thu, 29 Nov 2007, schreef Alvise Nicoletti: Yes, I have the packages needed to open a 32 bit file in my 64 bits distro (ubuntu-server): . linux32 ia32-libs lib32gcc1 lib32stdc++6 lib32

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] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Alvise Nicoletti
Marc Weustink ha scritto: Alvise Nicoletti wrote: Daniël Mantione ha scritto: Op Thu, 29 Nov 2007, schreef Alvise Nicoletti: Yes, I have the packages needed to open a 32 bit file in my 64 bits distro (ubuntu-server): . linux32 ia32-libs lib32gcc1 lib32stdc++6 lib32z1 libc6-dev-i386 lib32b

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] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Marc Weustink
Alvise Nicoletti wrote: Daniël Mantione ha scritto: Op Thu, 29 Nov 2007, schreef Alvise Nicoletti: Yes, I have the packages needed to open a 32 bit file in my 64 bits distro (ubuntu-server): . linux32 ia32-libs lib32gcc1 lib32stdc++6 lib32z1 libc6-dev-i386 lib32bz2-dev But the fpc compil

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] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Alvise Nicoletti
Daniël Mantione ha scritto: Op Thu, 29 Nov 2007, schreef Alvise Nicoletti: Yes, I have the packages needed to open a 32 bit file in my 64 bits distro (ubuntu-server): . linux32 ia32-libs lib32gcc1 lib32stdc++6 lib32z1 libc6-dev-i386 lib32bz2-dev But the fpc compiler version I'm using have b

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

Re: [fpc-devel] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Daniël Mantione
Op Thu, 29 Nov 2007, schreef Alvise Nicoletti: > Yes, I have the packages needed to open a 32 bit file in my 64 bits distro > (ubuntu-server): . > linux32 ia32-libs lib32gcc1 lib32stdc++6 lib32z1 libc6-dev-i386 lib32bz2-dev > > But the fpc compiler version I'm using have bugfixes introduced by

Re: [fpc-devel] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Jonas Maebe
Alvise Nicoletti wrote on do, 29 nov 2007: Florian Klaempfl ha scritto: Alvise Nicoletti schrieb: fpcdefs.inc(111,2) Error: User defined: Cross-compiling from non-i386 to i386 is not yet supported at this time cutils.pas(148,1) Fatal: There were 4 errors compiling module, stopping This is my

Re: [fpc-devel] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Alvise Nicoletti
Daniël Mantione ha scritto: Op Thu, 29 Nov 2007, schreef Joost van der Sluis: Most linux-distubutions do support 32 bit and 64 bit at the same time. So you can just install the 32-bit fpc-compiler on your system, and use this compiler to create 32-bit applications on your 64/32-bit OS.

Re: [fpc-devel] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Daniël Mantione
Op Thu, 29 Nov 2007, schreef Joost van der Sluis: > Most linux-distubutions do support 32 bit and 64 bit at the same time. > So you can just install the 32-bit fpc-compiler on your system, and use > this compiler to create 32-bit applications on your 64/32-bit OS. Distribution support is not ev

Re: [fpc-devel] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Alvise Nicoletti
Florian Klaempfl ha scritto: Alvise Nicoletti schrieb: Hi... I need to cross-compile an application in a 64 bit environment, (fully working with lazarus 0.9.23 and FPC 2.2.1), for 32 bits archs. I tryed to follow this guide: http://wiki.lazarus.freepascal.org/Cross_compiling But I have the

Re: [fpc-devel] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Joost van der Sluis
Op donderdag 29-11-2007 om 10:19 uur [tijdzone +0100], schreef Alvise Nicoletti: > Hi... I need to cross-compile an application in a 64 bit environment, > (fully working with lazarus 0.9.23 and FPC 2.2.1), for 32 bits archs. > > I tryed to follow this guide: > http://wiki.lazarus.freepascal.org/

Re: [fpc-devel] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Florian Klaempfl
Alvise Nicoletti schrieb: > Hi... I need to cross-compile an application in a 64 bit environment, > (fully working with lazarus 0.9.23 and FPC 2.2.1), for 32 bits archs. > > I tryed to follow this guide: > http://wiki.lazarus.freepascal.org/Cross_compiling > > But I have the following errors: > /

[fpc-devel] compile fpc for i386 from a 64 bit machine

2007-11-29 Thread Alvise Nicoletti
Hi... I need to cross-compile an application in a 64 bit environment, (fully working with lazarus 0.9.23 and FPC 2.2.1), for 32 bits archs. I tryed to follow this guide: http://wiki.lazarus.freepascal.org/Cross_compiling But I have the following errors: /home/siteland/lazarus/FPC_2.2.1/compil