How to use "default scope" in Language Concept Constraints? Follow
I have created a set of languages similar to the one in the tutorial (MyCalc, MyCalc2, etc...).
In the generated java however there is a "feature" that I do not find welcome:
the index for inputField is reused from one language to the other.
So, instead of each generated Java file having inputField0, the first language has inputField0, but the second has inputField1 and inputField2, and the third java file has inputField3.
I have followed the steps in the tutorial regarding the "property macro" template, using:
genContext uniqueName from "inputField" in context <no node>.
Would putting the correct value in the <no node> field above help?
If not, would changing the "default scope" in the constraints tab of the InputField concept Edit window fix this?
The existing documentation on "default scope" seems to indicate that is might, but no example is given on how to use it.
Regards,
Please sign in to leave a comment.
I have tried
genContext . unique name from " inputField " in context node . ancestor < concept = Calculator >
but this generates unique names for the variables such as:
inputField1234_0
inputField4321_0
However there is no need for this in Java, as the variables are private local variables inside 2 distinct classes.
I was just trying to avoid clutter and complication / weirdness in the generated Java files.
Regards,