<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Name Unresolved Error: Name Unresolved: lf in access or evaluation of 'lf' , lf in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Name-Unresolved-Error-Name-Unresolved-lf-in-access-or-evaluation/m-p/62240#M33538</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a variable called lf, (lf = ListF &amp;lt;&amp;lt; Get Items, where ListF is a list of items). I define ListF within&amp;nbsp;a function that contains a button box. In the&amp;nbsp;function for that button box, which is defined after the function where ListF is defined,&amp;nbsp;I set lf = ListF &amp;lt;&amp;lt; GetItems.&amp;nbsp; I can access the lf variable inside the functions but after the functions, when I write print(lf); it gives me this name unresolved error. Could you give me an idea as to why?&lt;/P&gt;&lt;P&gt;Function where ListF is defined:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;selectFileButton = Function({y},
win1 = New Window( "Select Files",
Lineup Box( N Col( 2 ), Spacing( 3 ),
Button Box( "File To Tag", ListF &amp;lt;&amp;lt; Append( ListData &amp;lt;&amp;lt; GetSelected )),
ListF = List Box( fileSelected, width( lbWidth ), nLines( 5 ), Numeric ), &lt;BR /&gt;Button Box("OK", OKScript1)))); &lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Function where lf is defined:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;OKScript1 = Expr(
	//win1 &amp;lt;&amp;lt; CloseWindow;
	lf = ListF &amp;lt;&amp;lt; Get Items);  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Outside both those functions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;print(lf); &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jul 2018 09:20:31 GMT</pubDate>
    <dc:creator>Jaz</dc:creator>
    <dc:date>2018-07-06T09:20:31Z</dc:date>
    <item>
      <title>Name Unresolved Error: Name Unresolved: lf in access or evaluation of 'lf' , lf</title>
      <link>https://community.jmp.com/t5/Discussions/Name-Unresolved-Error-Name-Unresolved-lf-in-access-or-evaluation/m-p/62240#M33538</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a variable called lf, (lf = ListF &amp;lt;&amp;lt; Get Items, where ListF is a list of items). I define ListF within&amp;nbsp;a function that contains a button box. In the&amp;nbsp;function for that button box, which is defined after the function where ListF is defined,&amp;nbsp;I set lf = ListF &amp;lt;&amp;lt; GetItems.&amp;nbsp; I can access the lf variable inside the functions but after the functions, when I write print(lf); it gives me this name unresolved error. Could you give me an idea as to why?&lt;/P&gt;&lt;P&gt;Function where ListF is defined:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;selectFileButton = Function({y},
win1 = New Window( "Select Files",
Lineup Box( N Col( 2 ), Spacing( 3 ),
Button Box( "File To Tag", ListF &amp;lt;&amp;lt; Append( ListData &amp;lt;&amp;lt; GetSelected )),
ListF = List Box( fileSelected, width( lbWidth ), nLines( 5 ), Numeric ), &lt;BR /&gt;Button Box("OK", OKScript1)))); &lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Function where lf is defined:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;OKScript1 = Expr(
	//win1 &amp;lt;&amp;lt; CloseWindow;
	lf = ListF &amp;lt;&amp;lt; Get Items);  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Outside both those functions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;print(lf); &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jul 2018 09:20:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Name-Unresolved-Error-Name-Unresolved-lf-in-access-or-evaluation/m-p/62240#M33538</guid>
      <dc:creator>Jaz</dc:creator>
      <dc:date>2018-07-06T09:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Name Unresolved Error: Name Unresolved: lf in access or evaluation of 'lf' , lf</title>
      <link>https://community.jmp.com/t5/Discussions/Name-Unresolved-Error-Name-Unresolved-lf-in-access-or-evaluation/m-p/62246#M33544</link>
      <description>&lt;P&gt;Still stuck on this, would really appreciate any help. Will provide the full code if needs be, thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jul 2018 13:24:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Name-Unresolved-Error-Name-Unresolved-lf-in-access-or-evaluation/m-p/62246#M33544</guid>
      <dc:creator>Jaz</dc:creator>
      <dc:date>2018-07-06T13:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Name Unresolved Error: Name Unresolved: lf in access or evaluation of 'lf' , lf</title>
      <link>https://community.jmp.com/t5/Discussions/Name-Unresolved-Error-Name-Unresolved-lf-in-access-or-evaluation/m-p/65618#M34333</link>
      <description>&lt;P&gt;Variable scope *might* be the issue. "lf" seems to be created and assigned a value inside of the eval&amp;nbsp;chunk of code: a local variable. When that chunk of code is complete, garbage collection deletes the local variable.&lt;BR /&gt;&lt;BR /&gt;Define "lf" and assign it a bogus value early so it becomes global. Then when are running the eval later, it won't define a local "lf" but a global "lf" that then the eval updates.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 18:33:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Name-Unresolved-Error-Name-Unresolved-lf-in-access-or-evaluation/m-p/65618#M34333</guid>
      <dc:creator>glenn_maxey0</dc:creator>
      <dc:date>2018-08-01T18:33:11Z</dc:date>
    </item>
  </channel>
</rss>

