<?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 Re: Bug when runing add in at JMP home page directly in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Bug-when-runing-add-in-at-JMP-home-page-directly/m-p/864852#M102830</link>
    <description>&lt;P&gt;I did as you said, print dt &amp;amp; dt2, and they are correct.&lt;/P&gt;
&lt;P&gt;Then I realized when I call columns in slider box, I did not specify which data table, so I put dt: before the column&lt;/P&gt;
&lt;P&gt;I&amp;nbsp; also add one more current data table(dt) again in the middle of code after I close dt2&lt;/P&gt;
&lt;P&gt;Now it works well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;lubPP = Lineup box(NCol(1),	
		PPtb = Text Box( "PP: " || Char( PPmin ) ),
		PPsb = Slider Box( 
			PPmin, PPmax, PPValue, 
			PPb &amp;lt;&amp;lt; Set Text( "PP: " || Char( PPValue ) ); 
			:PP  &amp;lt;&amp;lt; set each value(PPValue); // I should use dt:PP here
			new = dt:NewPP &amp;lt;&amp;lt; get values; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Apr 2025 15:13:14 GMT</pubDate>
    <dc:creator>BayesRabbit7133</dc:creator>
    <dc:date>2025-04-02T15:13:14Z</dc:date>
    <item>
      <title>Bug when runing add in at JMP home page directly</title>
      <link>https://community.jmp.com/t5/Discussions/Bug-when-runing-add-in-at-JMP-home-page-directly/m-p/864653#M102821</link>
      <description>&lt;P&gt;Hi JMP community:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I save 2 scripts into add-ins, and bug will happen in certain situation, the scripts work as following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The first add-in will create a new table and create several new columns, let's call this new table as "calculate table"&lt;/LI&gt;
&lt;LI&gt;Next I will run the second add-in in "calculate table", it&amp;nbsp; will require to open another existing file (let's call it "raw data table"), then get data from "raw data table" and input something into the "calculate table"&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//This is the first script
Names Default To Here( 1 );
New Table( "Calculate table");
dt = current data table();

newcolumn = {"X", "Y"};
for each({colval},newcolumn,
	dt &amp;lt;&amp;lt; new column(colval);
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//This is the starting lines of 2nd script

Names Default To Here( 1 );
dt = current data table();
file = Pick file( "Select raw data table" );

if(is empty(file),
	show("No file selected");
	stop();
);
Try(
	dt2 = open(file);
	,
	show("No file selected");
	stop();
);&lt;BR /&gt;&amp;nbsp;//&amp;nbsp;The&amp;nbsp;following&amp;nbsp;code&amp;nbsp;are&amp;nbsp;not&amp;nbsp;shown&amp;nbsp;here&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Situation without bug:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If I open any data table, run the 1st add-in, then run 2nd add-in in the new table, it works&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Situation with bug:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If I run the 1st add-in directly in JMP home page, then run 2nd add-in, the&amp;nbsp; 2nd add-in will have bug&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Basically what the 2nd add-in does is to get data and column formula from "raw data table", and input into "calculate table", then create a new window with slider box. The slider box won't work when bug happen, but get data and formula still works&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 09:00:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Bug-when-runing-add-in-at-JMP-home-page-directly/m-p/864653#M102821</guid>
      <dc:creator>BayesRabbit7133</dc:creator>
      <dc:date>2025-04-02T09:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when runing add in at JMP home page directly</title>
      <link>https://community.jmp.com/t5/Discussions/Bug-when-runing-add-in-at-JMP-home-page-directly/m-p/864675#M102824</link>
      <description>&lt;P&gt;Making a guess: the current data table isn't what you expect. Maybe print it to the log to verify. I think the current data table is in a context that often belongs to a window and the home window is adding another context. By running the addin from the table, you probably (1) make sure that table is current by touching it and (2) get the context which has that table as the current one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 10:37:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Bug-when-runing-add-in-at-JMP-home-page-directly/m-p/864675#M102824</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2025-04-02T10:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when runing add in at JMP home page directly</title>
      <link>https://community.jmp.com/t5/Discussions/Bug-when-runing-add-in-at-JMP-home-page-directly/m-p/864852#M102830</link>
      <description>&lt;P&gt;I did as you said, print dt &amp;amp; dt2, and they are correct.&lt;/P&gt;
&lt;P&gt;Then I realized when I call columns in slider box, I did not specify which data table, so I put dt: before the column&lt;/P&gt;
&lt;P&gt;I&amp;nbsp; also add one more current data table(dt) again in the middle of code after I close dt2&lt;/P&gt;
&lt;P&gt;Now it works well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;lubPP = Lineup box(NCol(1),	
		PPtb = Text Box( "PP: " || Char( PPmin ) ),
		PPsb = Slider Box( 
			PPmin, PPmax, PPValue, 
			PPb &amp;lt;&amp;lt; Set Text( "PP: " || Char( PPValue ) ); 
			:PP  &amp;lt;&amp;lt; set each value(PPValue); // I should use dt:PP here
			new = dt:NewPP &amp;lt;&amp;lt; get values; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 15:13:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Bug-when-runing-add-in-at-JMP-home-page-directly/m-p/864852#M102830</guid>
      <dc:creator>BayesRabbit7133</dc:creator>
      <dc:date>2025-04-02T15:13:14Z</dc:date>
    </item>
  </channel>
</rss>

