Fix Solution and Module Scope Changes since 6.0

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

Fix Solution and Module Scope Changes since 6.0

Postby ronm » Fri Aug 31, 2012 8:42 pm

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.
Attachments
Servoy Solution and Module Scope Change for v6x.pdf
(269.45 KiB) Downloaded 444 times
ronm
 
Posts: 10
Joined: Mon Feb 08, 2010 11:28 pm

Re: Fix Solution and Module Scope Changes since 6.0

Postby mboegem » Sun Sep 02, 2012 11:02 pm

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.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1742
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 9 guests

cron