When I create a GUI with hiCreateAppForm and run lint on the script I get global variables from the form name.
Is there a good way of scoping the variable so I don't get a Lint warning of global variable error.
Currently I have the GUI in a different file to lessen the global warning errors.
Well, a form symbol has to be global, so you can't avoid that, but what you can do is to make sure that it is named with an appropriate prefix (e.g. PS or MY etc.), and then on the Lint form you enter this for the package prefixes - this should allow Lint to recognise that these are required globals but have the appropriate prefix and so should not reduce your score.
Hope this helps!
As far as I know the variable which holds the form data structure has to be global.But you can specify a prefix for the global variables e.g. GB, GBmyFormDataStruc and follow this solution:http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:ViewSolution;solutionNumber=11174696;searchHash=e1a99c5a1796c0fd87c4d47ac8e87590
I forgot to mention that you can have all the code in one file, if that's more convenient. In fact, the "poor score" items are "diluted" over the length of the file, so as the file gets longer, the effect of the 'poor score' items is reduced, assuming that the rest of the code is good.
Lawrence only ad the prefix to the Package Prefixes will not do the job you also have to disable STRICT checking,
see the solution, I tested it ;-).