Android Question Multi code pages project

Himred

Member
Licensed User
Longtime User
Hello,

I have the feeling my question is somehow simple but after searching on the forum (which became my top consulted site for the last 7 days) i did not found an answer.

Currently my app is in 1000 code lines long (which is few) all in one window.
It became somehow boring to search (even with the IDE combo or ctrl+f) some functions.
As a C programmer I'm used to split my code into several files so files keep small and functions are sorted by kind (i/o, AI, interface, db,...)
I tryed to achieve the same with the IDE but failed, the best i managed to do is to add a new code module to my project, but no variables were shared (unless maybe I duplicate the definition from the main, which is boring...)

Do we have a way we could have several tabs which share process global vars as well as globals ?
If no, what is the recommended way to split my functions (that use process global and globals vars) in several tabs so we don't have huge code on only one tab.

Regards,

Himred
 

LucaMs

Expert
Licensed User
Longtime User
Given that English is not exactly my native language ...

Did you use the right method, code modules (though, in different ways, you can also use classes or libraries).

The variables and routines in modules can be shared: you can access them with the module name followed by a period and the name of the variable / routine, just like classes (like: DBHelper.DB - DB should be defined Public in Process_Globals).

As an example, see DBUtils (as you wrote: "... split my code into several files I keep small files and functions are sorted by kind (i / o, AI, interface, db, ...)"

But probably, I misunderstood the question
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
I tryed to achieve the same with the IDE but failed, the best i managed to do is to add a new code module to my project, but no variables were shared (unless maybe I duplicate the definition from the main, which is boring...)

Do we have a way we could have several tabs which share process global vars as well as globals ?
If no, what is the recommended way to split my functions (that use process global and globals vars) in several tabs so we don't have huge code on only one tab.

Regards,

Himred[/quote]

My understanding(I could be wrong) is Himred does not want only one "MAIN" with all the code in it but multiple modules across the top of the IDE that correspond with one another.

example multiple "MAINS" across the top with multiple
Sub Process_Globals
Sub Globals
Sub Activity_Create
 
Upvote 0

Himred

Member
Licensed User
Longtime User
Thanks guysfor your tips, i now understood how to do it with module.var_name syntax.
Ctrl+E is very useful Erel, I just watched your video on IDE tips.

Community here is very helpful it's a pleasure.
 
Upvote 0
Top