In 6.x, global scope means solution global, module a global, module b global, et cetera. Only a method in the solution a can see global variables declared in module a and module b.
A method in module a cannot see a global variable declared in the solution a or a global variable declared in module b. Please see the attached PDF for illustrations of this issue.
I am proposing either one of the two solutions included in the PDF attachment.
- Proposal One:
A 6.x solution level property that when set true allows the behavior as in Servoy v3.x through Servoy 5.x. The property could default to false.
or Proposal Two:
Two 6.x solution level properties, the first solution level property would affect the child to parent relationship so that when set to true, the child would be allowed to see the global methods and global variables declared in the parent. A second solution level property would affect the child to sibling relationships so that when set to true, the global methods and global variables declared in a sibling module would be visible to another sibling module and vice-versa. Both of these solution level properties could default to false.
For completeness a third solution level property when set to true, would allow any child (such a grandchild or great-grandchild, etc.) to see the global methods and global variables declared by any of its ancestors. This third solution level property along with the first two solution level properties would be the functional equivalent of the single solution level property described in Proposal One. All of these solution level properties could default to false.