I've made light use of the tabs in the IDE in a few programs I've written, but my current program is much more complex and I thought I would seperate out various functions into various tabs so that I could keep track of everyting. Ie, a tab for my sound code and globals, a tab for my servo code and globals, etc.
But when I tried doing this I ran into nothing but problems.
For example, apparently a global variable declared in one tab isn't really global at all and is local to the functions in that tab? To get around this, I gave in and moved all my globals back into my main tab. But then I ran into another error where a function in one tab referenced functions in another tab and it complained that they were out of scope.
So now I'm wondering what I should do. I mean it seems like the only way to solve this is to declare all my functions somewhere. But that rubs me the wrong way. Take my servo functions for example. I want that to be a seperate set of functions I can include in future projects. But it seems here my choices are limited to redeclaring the functions in it in my main program, or creating a header file with the declarations and including that at the top of my code. The latter is not a nice solution because then I'll have twice as many tabs in my IDE and half of them will have one or two lines of code.
I guess I could rename all the tabs to header files, and just stick the functions and globals for those functions in there but I think I would then need to be careful about which order I include the files or else a function might use a global declared after it in the include list, and I'm guessing that would lead to an error about a variable not being declared...
I just want a clean way of doing this. I'm used to working with an IDE in another language which kept all my functions listed for me on the side of the pane so I could quickly jump between them, so it didn't matter if most stuff was in one file, but now my code is a mess and it's hard to jump to where I need to be to look at stuff and then go back.
Anyway, any suggestions for how I should handle cleaning this code up in a way which works well with the IDE would be appreciated.