Displayed Items: "current project or all files"

Post bugs related to the IDE here
Cyllceaux
Enthusiast
Enthusiast
Posts: 458
Joined: Mon Jun 23, 2014 1:18 pm
Contact:

Displayed Items: "current project or all files"

Post by Cyllceaux »

This does not work for modules.
Image

easy to reproduce.

4 Files

File1: DeclareModule
File2: Module
File3, File4: Includes

File2 includes File1 in a Module. File 2 can use References of File1
File2 includes File3 and File4: File3 doesn't see anything of File2 and File1 but of File4, File2 doesn't see anything of File3. File4 only sees File3

File1.pb

Code: Select all

DeclareModule Test
    #TEST1=1
EndDeclareModule
File2.pb

Code: Select all

Module Test
    #TEST2=1
    XIncludeFile "File3.pb"
    XIncludeFile "File4.pb"
   ; #TEST1 can be use, and is shown in the Editor
   ; #TEST3 can be use, but is not shown in the Editor
   ; #TEST4 can be use, but is not shown in the Editor
EndModule
File3.pb

Code: Select all

   ; #TEST1 can be use, but is not shown in the Editor
   ; #TEST2 can be use, but is not shown in the Editor
   ; #TEST4 can't be use (worked as designed), but is shown in the Editor
   #TEST3=1
File4.pb

Code: Select all

   ; #TEST1 can be use, but is not shown in the Editor
   ; #TEST2 can be use, but is not shown in the Editor
   ; #TEST3 can be use, but is not shown in the Editor
   #TEST4=1
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

Re: Displayed Items: "current project or all files"

Post by helpy »

It works as expected with 5.73 x64 on Windows 10!
Tested with and without project!

BUT:
PureBasic scans each file independently.
That means, that #Test3 and #Test4 are part of the global scope from the point of view of the autocomplete function.
==> Inside Module of File2 the editor does not see #Test3 and #Test4.
==> Outside Module of File2 (in global scope) the editor sees #Test3 and #Test4.
....

I never got this problem, because I do not include files inside modules ;-)
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
Cyllceaux
Enthusiast
Enthusiast
Posts: 458
Joined: Mon Jun 23, 2014 1:18 pm
Contact:

Re: Displayed Items: "current project or all files"

Post by Cyllceaux »

helpy wrote: Fri Jun 11, 2021 5:41 pm It works as expected with 5.73 x64 on Windows 10!
Tested with and without project!

BUT:
PureBasic scans each file independently.
That means, that #Test3 and #Test4 are part of the global scope from the point of view of the autocomplete function.
==> Inside Module of File2 the editor does not see #Test3 and #Test4.
==> Outside Module of File2 (in global scope) the editor sees #Test3 and #Test4.
....

I never got this problem, because I do not include files inside modules ;-)
I understand you... this is not the point :)
Btw... I don't like Modules with more than 1.000 lines of code, but I have some with more of 10.000 lines. PB is slowing down extremely in that case.

My problem is, why sees File3 #TEST4, but File4 can't see #TEST3. Both are in a global scope
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

Re: Displayed Items: "current project or all files"

Post by helpy »

Cyllceaux wrote: Sat Jun 12, 2021 6:02 am My problem is, why sees File3 #TEST4, but File4 can't see #TEST3. Both are in a global scope
I tested this case again with and without a project.
And on my system inside File4 the Editor displays #TEST3 in autocomplete list!

Are you using a PB project?
In the project settings, you can set an option for each file if it should be scanned or not.
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
Cyllceaux
Enthusiast
Enthusiast
Posts: 458
Joined: Mon Jun 23, 2014 1:18 pm
Contact:

Re: Displayed Items: "current project or all files"

Post by Cyllceaux »

helpy wrote: Sat Jun 12, 2021 9:07 am
Cyllceaux wrote: Sat Jun 12, 2021 6:02 am My problem is, why sees File3 #TEST4, but File4 can't see #TEST3. Both are in a global scope
I tested this case again with and without a project.
And on my system inside File4 the Editor displays #TEST3 in autocomplete list!

Are you using a PB project?
In the project settings, you can set an option for each file if it should be scanned or not.
Yes... I created a new project to test this. I reinstalled PB again, reload the project... same problem :(

But... if you say this works always, but only not on my system... this thread can be close :)
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Displayed Items: "current project or all files"

Post by mk-soft »

If it gets stuck, it can also be due to Purebasic.pref. Reset this (rename or delete).

Folder Window: %Appdata%\Purebasic
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

Re: Displayed Items: "current project or all files"

Post by helpy »

Did you checked the project settings?
Image
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
Cyllceaux
Enthusiast
Enthusiast
Posts: 458
Joined: Mon Jun 23, 2014 1:18 pm
Contact:

Re: Displayed Items: "current project or all files"

Post by Cyllceaux »

Yes... all of them are "yes"
Cyllceaux
Enthusiast
Enthusiast
Posts: 458
Joined: Mon Jun 23, 2014 1:18 pm
Contact:

Re: Displayed Items: "current project or all files"

Post by Cyllceaux »

mk-soft wrote: Sat Jun 12, 2021 10:13 am If it gets stuck, it can also be due to Purebasic.pref. Reset this (rename or delete).

Folder Window: %Appdata%\Purebasic
I did... after deinstalling PB.
Post Reply