PolyPusher
Guest
Thu Jul 22, 2010 5:08 pm
Hi All,
I am trying to clean up all my global variables(using Skill Lint).
In some of my routines I am accessing the form like
EFSchematicProbeForm->EFSpecTrace->choices. It seems if you do
this, EFSchematicProbeForm needs to be global. If I put
EFSchematicProbeForm in the let or prog, then I won't be able
communitcate with the form.
Is there an app for that ;)
Thank you in advance for any help,
Eric
procedure(EFSpecTraceList()
let((EFNetNavSpecFullDone EFNetNavSpecFullListVar)
foreach(mapc EFNetTwoProbeVar EFSchematicProbeForm->EFProbeBox->value
foreach(mapc x EFSchematicProbeForm->EFSpecTrace->choices
x=list(x)
if(EFNetTwoProbeVar==car(parseString(car(x) "=="))
Andrew Beckett
Guest
Thu Jul 22, 2010 5:25 pm
PolyPusher wrote, on 07/22/10 15:08:
Quote:
Hi All,
I am trying to clean up all my global variables(using Skill Lint).
In some of my routines I am accessing the form like
EFSchematicProbeForm->EFSpecTrace->choices. It seems if you do
this, EFSchematicProbeForm needs to be global. If I put
EFSchematicProbeForm in the let or prog, then I won't be able
communitcate with the form.
Is there an app for that ;)
Thank you in advance for any help,
Eric
procedure(EFSpecTraceList()
let((EFNetNavSpecFullDone EFNetNavSpecFullListVar)
foreach(mapc EFNetTwoProbeVar EFSchematicProbeForm->EFProbeBox->value
foreach(mapc x EFSchematicProbeForm->EFSpecTrace->choices
x=list(x)
if(EFNetTwoProbeVar==car(parseString(car(x) "=="))
Hi Eric,
In general, top level user interface storage variables need to be global
(strictly speaking this isn't true, the UI is blocking and you display it in the
same scope that it was created, but it's a good general rule).
Otherwise if you create them as local, when you try to interact with the form,
it cannot find the variable in scope - and it needs that to be able to have the
expression in the CDS.log...
So, the best thing is to give SKILL Lint a prefix to filter out any "valid"
global variables.
Note that you don't need form fields to be global - just forms, menus and dialog
boxes (etc) - not form fields, menu items.
Regards,
Andrew.
Pete nospam Zakel
Guest
Thu Jul 22, 2010 9:34 pm
In article <00e51044-77fe-4e14-bf7f-4ca2027b539a_at_x20g2000pro.googlegroups.com> PolyPusher <eric.d.fitzsimmons_at_gmail.com> writes:
Quote:
Hi All,
I am trying to clean up all my global variables(using Skill Lint).
In some of my routines I am accessing the form like
EFSchematicProbeForm->EFSpecTrace->choices. It seems if you do
this, EFSchematicProbeForm needs to be global. If I put
EFSchematicProbeForm in the let or prog, then I won't be able
communitcate with the form.
Is there an app for that
Not really. The form *is* global. If you create a local variable of the
same name, then you are hiding the global variable and that's why you cannot
then access the form, since the local variable has whatever value you assigned
to it (or nil if you didn't assign a value).
You could create a local variable of a different name that you assign the
global variable to hide it, but the form itself must have a global variable to
access it.
-Pete Zakel
(phz_at_seeheader.nospam)
"LISP is the machine language of higher-level languages."
-- Alan Kay