Re: [lazarus] protected-Variables not visible in another file?

2007-12-29 Thread Lukas Gradl
OK - some wonderful hours of sleep and I discovered a second version of file2... And voila - in this (newer) version FValue was declared public... thanks for all the help. Lukas Lukas Gradl schrieb: Sorry, might need a little bit more sleep - but at the moment I'm stuck: I've to convert

[lazarus] protected-Variables not visible in another file?

2007-12-28 Thread Lukas Gradl
Sorry, might need a little bit more sleep - but at the moment I'm stuck: I've to convert some files from Delphi to FPC (2.3.1, using Lazarus 0.9.25 only as an editor) In Delphi there is a a class TExample defined in file1.pas. TExample=class protected FValue:longint; end; in file2.pas I

Re: [lazarus] protected-Variables not visible in another file?

2007-12-28 Thread Mattias Gaertner
On Fri, 28 Dec 2007 21:38:47 +0100 Lukas Gradl [EMAIL PROTECTED] wrote: Sorry, might need a little bit more sleep - but at the moment I'm stuck: I've to convert some files from Delphi to FPC (2.3.1, using Lazarus 0.9.25 only as an editor) In Delphi there is a a class TExample defined in

Re: [lazarus] protected-Variables not visible in another file?

2007-12-28 Thread Lukas Gradl
Mattias Gaertner schrieb: On Fri, 28 Dec 2007 21:38:47 +0100 Lukas Gradl [EMAIL PROTECTED] wrote: Sorry, might need a little bit more sleep - but at the moment I'm stuck: I've to convert some files from Delphi to FPC (2.3.1, using Lazarus 0.9.25 only as an editor) In Delphi there is a a

Re: [lazarus] protected-Variables not visible in another file?

2007-12-28 Thread Vincent Snijders
Lukas Gradl schreef: Mattias Gaertner schrieb: On Fri, 28 Dec 2007 21:38:47 +0100 Lukas Gradl [EMAIL PROTECTED] wrote: Sorry, might need a little bit more sleep - but at the moment I'm stuck: I've to convert some files from Delphi to FPC (2.3.1, using Lazarus 0.9.25 only as an editor)

Re: [lazarus] protected-Variables not visible in another file?

2007-12-28 Thread Marius
In Delphi there is a a class TExample defined in file1.pas. TExample=class protected FValue:longint; end; in file2.pas I did: use file1; {...} Example:=TExample.Create; if Example.FValue=0 then begin... {...} When compiling with FPC and $MODE DELPHI I get an Identifier not found error. Any

Re: [lazarus] protected-Variables not visible in another file?

2007-12-28 Thread Lukas Gradl
You must be wrong because this example will not work in delphi (i tried). The only way you can use this mechanisme when the code of file1 is located in file2. There's a simple trick though: TExampleFriend=class(TExample); end; if TExampleFriend(Example).FValue=0 then begin... Really

Re: [lazarus] protected-Variables not visible in another file?

2007-12-28 Thread Marius
But I'm shure there's no Class-descendant in file2. Am I right that the handling of protected-statements should be the same in D7 and FPC? Then I'm looking elsewhere for the solution to this mysterious phenomenon... *bg* AFAIK they behave exactly the same. I can only think you are