Hi Folks, Prolly another dumb question - my speciality
I have a module of the main solution where I’d like to call the rowBG global from my main solution. Seems the method selector form only lists globals from this current module?
Is there a way to call the main solution global other than creating a method to call the global, or duplicating the rowBG code in the module?
The thing is that even if you cannot ‘see’ the globals in the code completion, you can still use them, since the solution is flattened when you use it at runtime…
But what Marc means - I know you often need a translation Ian! - is that if you want to get globals code completion, you need to
1/ activate your module (like a main solution), then
2/ add your main solution as a module to your module (yes, this is going to be a circular reference, but it works fine), then
3/ reactivate you main solution.
From then on, you will be able to see the globals in code completion.
ptalbot:
The thing is that even if you cannot ‘see’ the globals in the code completion, you can still use them, since the solution is flattened when you use it at runtime…
But what Marc means - I know you often need a translation Ian! - is that if you want to get globals code completion, you need to
1/ activate your module (like a main solution), then
2/ add your main solution as a module to your module (yes, this is going to be a circular reference, but it works fine), then
3/ reactivate you main solution.
From then on, you will be able to see the globals in code completion.
Hope this helps
Thanks Patrick - but I’m not really concened about code completeion I just want to call the global from a lower (in the structure) module - but cant see how I might format the call if its not available in the method selector.
I guess globals.rowBGColor in the rowBG property of the module form wont do it - right?
BTW I’m not sure a Guy from Canada speaking French could in any way be considered a translator of Dutch English to English especially since Marc speaks better English than I do LOL.
I think it is better to think about your module structure.
The idea of modules is that you have some set of forms and methods that together have some defined responsibility.
Typically you have a main solution that uses (has knowledge of) modules, but modules to be reusable, they must not have knowledge of calling solutions or modules.
If your module code is really tied to your main solution code and vv, you may consider putting all in one solution/module.
Another way to work around this to make your main solution module of your module (which is kind of a hack, but works) so they both know of each other.
That way you can refer to the global method in your main solution, but you module is not reusable in other solutions.