Page 1 of 1

Fix Solution and Module Scope Changes since 6.0

PostPosted: Fri Aug 31, 2012 8:42 pm
by ronm
Since 6.0, the scope of globals modules and variables have changed. In 6.x, a module method cannot see a global variable declared in the main solution.

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.

I have several major process intensive applications in production since Servoy version 3.18 but are stuck at Servoy version 5.2.x because of the redefinition of the scope of globals in 6.x.

Re: Fix Solution and Module Scope Changes since 6.0

PostPosted: Sun Sep 02, 2012 11:02 pm
by mboegem
Hi Ron,

apart from the build markers nothing has changed in version 6.0 compared to previous versions.
Your existing solutions will still work.

The buildmarkers you see are just a warning that the object you're referencing cannot be seen by Servoy and thus have no further auto-completion.
If you want just turn these specific warnings 'off'

As soon as a Servoy solution is deployed, the structure is flattened and as mentioned before your existing solutions will still work.