Home > Community > Forums > Custom IC SKILL > Scope form name variable

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Scope form name variable 

Last post Wed, Jul 3 2013 10:28 AM by berndfi. 4 replies.
Started by psill000 03 Jul 2013 09:26 AM. Topic has 4 replies and 510 views
Page 1 of 1 (5 items)
Sort Posts:
  • Wed, Jul 3 2013 9:26 AM

    • psill000
    • Top 200 Contributor
    • Joined on Sat, Jun 1 2013
    • Posts 40
    • Points 755
    Scope form name variable Reply

    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.

     

    Paul

    • Post Points: 50
  • Wed, Jul 3 2013 10:24 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,598
    • Points 16,075
    Re: Scope form name variable Reply

     Hi Paul,

    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!

    Lawrence.

    • Post Points: 5
  • Wed, Jul 3 2013 10:26 AM

    • berndfi
    • Top 100 Contributor
    • Joined on Tue, Sep 11 2012
    • Neubiberg, Bavaria
    • Posts 67
    • Points 1,255
    Re: Scope form name variable Reply

    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;solutionNu
    mber=11174696;searchHash=e1a99c5a1796c0fd87c4d47ac8e87590
     

    • Post Points: 5
  • Wed, Jul 3 2013 10:26 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,598
    • Points 16,075
    Re: Scope form name variable Reply

     Paul,

    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.

    Regards,

    Lawrence.

    • Post Points: 5
  • Wed, Jul 3 2013 10:28 AM

    • berndfi
    • Top 100 Contributor
    • Joined on Tue, Sep 11 2012
    • Neubiberg, Bavaria
    • Posts 67
    • Points 1,255
    Re: Scope form name variable Reply

    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 ;-).

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by psill000 at 03 Jul 2013 09:26 AM. Topic has 4 replies.