Hi,
Maybe someone already said this on the forum, but when you have multiple files in a project, and a module for each file, and a common module ; all procedures called from the common module are not recognized by AutoComplete. That would be great to see that fixed
[SOLVED] AutoComplete and modules
[SOLVED] AutoComplete and modules
Last edited by Joubarbe on Sat Apr 25, 2015 11:12 am, edited 1 time in total.
Re: AutoComplete and modules
I'm not %100 sure this is what you are looking for but have a look in the preferences under autocomplete/displayed items.
Re: AutoComplete and modules
I'm aware of that, I'm not looking for anything. I'm pretty sure it's a bug. The AutoComplete does not work at all in the case I described.
Common.pb :
UI.pb :
FYI, all the files are in a single project.
Common.pb :
Code: Select all
DeclareModule Common
Declare MyProcedure()
EndDeclareModule
DeclareModule UI
UseModule Common
EndDeclareModule
Module Common
Procedure MyProcedure()
; stuff
EndProcedure
EndModule
XIncludeFile "UI.pb"
Code: Select all
Module UI
; if you try to call MyProcedure() from here, AutoComplete will not work - it will work however if you don't use "UseModule Common" and call Common::MyProcedure() ; but the point of having a common module is to avoid that.
EndModule
Re: AutoComplete and modules
I see. (edit removed wrong answer ..sorry)
I just tried your code and it works for me. Autocomplete does see the module.
I just tried your code and it works for me. Autocomplete does see the module.
Last edited by sancho2 on Sat Apr 25, 2015 8:46 am, edited 2 times in total.
Re: AutoComplete and modules
Wot ?
That's what it does. It includes the Common module... "UseModule Common". That should work.
That's what it does. It includes the Common module... "UseModule Common". That should work.
Re: AutoComplete and modules
Looks like I'm losing all around on this one. It does work but you do have to qualify it with the module name, ie:
Which makes the UseModule command redundant. Your point is valid, sorry about the confusion.
Code: Select all
Common::MyProcedure()
Re: AutoComplete and modules
Its not a bug but rather a limitation of the way AutoComplete is implemented. I have written about this here: http://www.purebasic.fr/blog/?p=417
All you have to do is to repeat the UseModule keyword inside your Module to help the IDE understand the connection.
All you have to do is to repeat the UseModule keyword inside your Module to help the IDE understand the connection.
Code: Select all
Module UI
UseModule Common
; Now AutoComplete should work
EndModule
quidquid Latine dictum sit altum videtur
Re: AutoComplete and modules
Great, thank you freak !