Re: [Lazarus] Code completion problems with Graph units

2014-09-11 Thread Sven Barth
Am 10.09.2014 22:17 schrieb Mattias Gaertner nc-gaert...@netcologne.de:

 On Wed, 10 Sep 2014 17:36:19 +0200
 Sven Barth pascaldra...@googlemail.com wrote:

 [...]
Lazarus version is 1.2.4 on i386-linux-gtk2
  
   Under Linux 64bit I can use the 'graph' unit and find declaration
finds
   $fpc/packages/graph/src/unix/graph.pp
   Then FD on the {$i graphh.inc} gets me to
   $fpc/packages/graph/src/inc/graphh.inc

 I tested with linux-i386 and it works too.
 So, maybe it's an issue with Lazarus 1.2.4.
 Can you test with a 1.3 or a newer 1.2?

With 1.3 it works correctly (at least on Win32 where I tested it). I did
not test a newer 1.2 though (you mean 1.2.5 here, right?).

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code completion problems with Graph units

2014-09-10 Thread Sven Barth

On 10.09.2014 07:52, Sven Barth wrote:

On 10.09.2014 00:23, Howard Page-Clark wrote:

On 09/09/2014 21:17, Sven Barth wrote:

Hello together!

I'm currently working on a project that uses the good old Graph units
(or PtcGraph to be more precise) and I have the problem that code
completion is erratic if (Ptc)Graph is in the uses-clause, because the
IDE can not find the graphh.inc include file which is at the top of all
Graph units. This include file is located in $fpc/packages/graph/src/inc
whereas the full Graph units are located in other directories of
$fpc/packages/graph/src/.
I've also tried adding the path of the include directory to the Other
source files or the Include directories path. The IDE then either
complains that it still can not find the file or it complains that it
could not find the end of the file with the cursor still getting
positioned at the $include directive.

Any ideas I could try? (besides commenting out the include directive :P)


I think you can use the Codetools Defines Editor (4th item in the Tools
menu) to add the include path.
However, I have never figured out exactly how to do that for FPC and
Lazarus sources which the Codetools treats specially (even though there
is a wiki page that ought to help:
http://wiki.lazarus.freepascal.org/IDE_Window:_Codetools_Defines_Editor).


Hmm... the interesting thing is that there *is* already an entry
especially for Graph (Free Pascal Sources = Free Pascal Source
Directory = Packages = extra = graph). But it does not seem to work
:/ Maybe that extra node is too much there?


Nope... moving the graph node up does not change anything *sigh*

Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code completion problems with Graph units

2014-09-10 Thread payl

On 10.09.2014 07:52, Sven Barth wrote:

Nope... moving the graph node up does not change anything *sigh*

(Warning: No nice solutions here)
Well I would first try if CodeTools are just unable to find inc file, so I  
would try to move/copy include file so CodeTools can find it. You noted  
that sometimes It tells you it's unable to find end of file: Maybe  
conditionals make CodeTools ignore rest of file? You could try messing  
with predefined conditionals. Or bruteforce solution: Manually include inc  
file and then test if everything works.
I wouldn't be surprised if CodeTools couldn't parse this file due to some  
bug in parsing, there are still some notable bugs there.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code completion problems with Graph units

2014-09-10 Thread Mattias Gaertner
On Tue, 09 Sep 2014 22:17:38 +0200
Sven Barth pascaldra...@googlemail.com wrote:

 Hello together!
 
 I'm currently working on a project that uses the good old Graph units 
 (or PtcGraph to be more precise) and I have the problem that code 
 completion is erratic if (Ptc)Graph is in the uses-clause, because the 
 IDE can not find the graphh.inc include file which is at the top of all 
 Graph units. This include file is located in $fpc/packages/graph/src/inc 
 whereas the full Graph units are located in other directories of 
 $fpc/packages/graph/src/.
 I've also tried adding the path of the include directory to the Other 
 source files or the Include directories path. The IDE then either 
 complains that it still can not find the file or it complains that it 
 could not find the end of the file with the cursor still getting 
 positioned at the $include directive.
 
 Any ideas I could try? (besides commenting out the include directive :P)
 
 Lazarus version is 1.2.4 on i386-linux-gtk2

Under Linux 64bit I can use the 'graph' unit and find declaration finds 
$fpc/packages/graph/src/unix/graph.pp
Then FD on the {$i graphh.inc} gets me to
$fpc/packages/graph/src/inc/graphh.inc

Works on 2.6.4 and 2.7.1.

It works with unit ptcgraph as well:
$fpc/packages/graph/src/ptcgraph/ptcgraph.pp
$fpc/packages/graph/src/inc/graphh.inc

Have you tried Tools / Rescan FPC source directory?

Note: The FPC source directory has its own search paths. It does not use
the project's search paths.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code completion problems with Graph units

2014-09-10 Thread Sven Barth
Am 10.09.2014 11:19 schrieb Mattias Gaertner nc-gaert...@netcologne.de:

 On Tue, 09 Sep 2014 22:17:38 +0200
 Sven Barth pascaldra...@googlemail.com wrote:

  Hello together!
 
  I'm currently working on a project that uses the good old Graph units
  (or PtcGraph to be more precise) and I have the problem that code
  completion is erratic if (Ptc)Graph is in the uses-clause, because the
  IDE can not find the graphh.inc include file which is at the top of all
  Graph units. This include file is located in $fpc/packages/graph/src/inc
  whereas the full Graph units are located in other directories of
  $fpc/packages/graph/src/.
  I've also tried adding the path of the include directory to the Other
  source files or the Include directories path. The IDE then either
  complains that it still can not find the file or it complains that it
  could not find the end of the file with the cursor still getting
  positioned at the $include directive.
 
  Any ideas I could try? (besides commenting out the include directive :P)
 
  Lazarus version is 1.2.4 on i386-linux-gtk2

 Under Linux 64bit I can use the 'graph' unit and find declaration finds
 $fpc/packages/graph/src/unix/graph.pp
 Then FD on the {$i graphh.inc} gets me to
 $fpc/packages/graph/src/inc/graphh.inc

 Works on 2.6.4 and 2.7.1.

 It works with unit ptcgraph as well:
 $fpc/packages/graph/src/ptcgraph/ptcgraph.pp
 $fpc/packages/graph/src/inc/graphh.inc

 Have you tried Tools / Rescan FPC source directory?

I now did, no difference. I can reproduce it on i368-linux (1.2.4) and
i368-win32 (1.2.2). What did work however is copying the graph include
files and units to a local directory and including that in Other sources.

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code completion problems with Graph units

2014-09-10 Thread Mattias Gaertner
On Wed, 10 Sep 2014 17:36:19 +0200
Sven Barth pascaldra...@googlemail.com wrote:

[...]
   Lazarus version is 1.2.4 on i386-linux-gtk2
 
  Under Linux 64bit I can use the 'graph' unit and find declaration finds
  $fpc/packages/graph/src/unix/graph.pp
  Then FD on the {$i graphh.inc} gets me to
  $fpc/packages/graph/src/inc/graphh.inc

I tested with linux-i386 and it works too.
So, maybe it's an issue with Lazarus 1.2.4.
Can you test with a 1.3 or a newer 1.2?

 
 I can reproduce it on i368-linux (1.2.4) and
 i368-win32 (1.2.2). What did work however is copying the graph include
 files and units to a local directory and including that in Other sources.


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Code completion problems with Graph units

2014-09-09 Thread Sven Barth

Hello together!

I'm currently working on a project that uses the good old Graph units 
(or PtcGraph to be more precise) and I have the problem that code 
completion is erratic if (Ptc)Graph is in the uses-clause, because the 
IDE can not find the graphh.inc include file which is at the top of all 
Graph units. This include file is located in $fpc/packages/graph/src/inc 
whereas the full Graph units are located in other directories of 
$fpc/packages/graph/src/.
I've also tried adding the path of the include directory to the Other 
source files or the Include directories path. The IDE then either 
complains that it still can not find the file or it complains that it 
could not find the end of the file with the cursor still getting 
positioned at the $include directive.


Any ideas I could try? (besides commenting out the include directive :P)

Lazarus version is 1.2.4 on i386-linux-gtk2

Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code completion problems with Graph units

2014-09-09 Thread Howard Page-Clark

On 09/09/2014 21:17, Sven Barth wrote:

Hello together!

I'm currently working on a project that uses the good old Graph units
(or PtcGraph to be more precise) and I have the problem that code
completion is erratic if (Ptc)Graph is in the uses-clause, because the
IDE can not find the graphh.inc include file which is at the top of all
Graph units. This include file is located in $fpc/packages/graph/src/inc
whereas the full Graph units are located in other directories of
$fpc/packages/graph/src/.
I've also tried adding the path of the include directory to the Other
source files or the Include directories path. The IDE then either
complains that it still can not find the file or it complains that it
could not find the end of the file with the cursor still getting
positioned at the $include directive.

Any ideas I could try? (besides commenting out the include directive :P)


I think you can use the Codetools Defines Editor (4th item in the Tools 
menu) to add the include path.
However, I have never figured out exactly how to do that for FPC and 
Lazarus sources which the Codetools treats specially (even though there 
is a wiki page that ought to help:

http://wiki.lazarus.freepascal.org/IDE_Window:_Codetools_Defines_Editor).

Howard


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Code completion problems with Graph units

2014-09-09 Thread Sven Barth

On 10.09.2014 00:23, Howard Page-Clark wrote:

On 09/09/2014 21:17, Sven Barth wrote:

Hello together!

I'm currently working on a project that uses the good old Graph units
(or PtcGraph to be more precise) and I have the problem that code
completion is erratic if (Ptc)Graph is in the uses-clause, because the
IDE can not find the graphh.inc include file which is at the top of all
Graph units. This include file is located in $fpc/packages/graph/src/inc
whereas the full Graph units are located in other directories of
$fpc/packages/graph/src/.
I've also tried adding the path of the include directory to the Other
source files or the Include directories path. The IDE then either
complains that it still can not find the file or it complains that it
could not find the end of the file with the cursor still getting
positioned at the $include directive.

Any ideas I could try? (besides commenting out the include directive :P)


I think you can use the Codetools Defines Editor (4th item in the Tools
menu) to add the include path.
However, I have never figured out exactly how to do that for FPC and
Lazarus sources which the Codetools treats specially (even though there
is a wiki page that ought to help:
http://wiki.lazarus.freepascal.org/IDE_Window:_Codetools_Defines_Editor).


Hmm... the interesting thing is that there *is* already an entry 
especially for Graph (Free Pascal Sources = Free Pascal Source 
Directory = Packages = extra = graph). But it does not seem to work 
:/ Maybe that extra node is too much there?


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus