<?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 How do I wait until a button is pressed in a function of another file to return to the main file? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513568#M74094</link>
    <description>&lt;P&gt;I'm having an issue in my code where I press a button and it goes into another function in another file (using Include("filename.jsl"); Once the button is pressed the function from the other file runs and returns back to the main function in the main file and continues running. This is not what I want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I make it so the code stops in the second function (the one in another file) and wait for the Ok button to be pressed before returning back to the original function in the main file?&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 17:02:24 GMT</pubDate>
    <dc:creator>Andyon98</dc:creator>
    <dc:date>2023-06-09T17:02:24Z</dc:date>
    <item>
      <title>How do I wait until a button is pressed in a function of another file to return to the main file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513568#M74094</link>
      <description>&lt;P&gt;I'm having an issue in my code where I press a button and it goes into another function in another file (using Include("filename.jsl"); Once the button is pressed the function from the other file runs and returns back to the main function in the main file and continues running. This is not what I want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I make it so the code stops in the second function (the one in another file) and wait for the Ok button to be pressed before returning back to the original function in the main file?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:02:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513568#M74094</guid>
      <dc:creator>Andyon98</dc:creator>
      <dc:date>2023-06-09T17:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I wait until a button is pressed in a function of another file to return to the main file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513573#M74095</link>
      <description>&lt;P&gt;I'm not exactly sure what is the problem, but maybe using modal windows would help?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw_expr = Expr(New Window("2", &amp;lt;&amp;lt; modal,
	Text Box("Second")
	, &amp;lt;&amp;lt; Move Window(0,0)
));

nw = New Window("1", &amp;lt;&amp;lt; modal,
	Button Box("2", nw_expr);
);

Show("Continue");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Jun 2022 10:11:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513573#M74095</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-06-24T10:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I wait until a button is pressed in a function of another file to return to the main file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513576#M74096</link>
      <description>&lt;P&gt;My issue is when I press button on the on the first menu, the code runs on even though another window has popped up. I want to have it so it will only continue if a button is pressed on the second window.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 10:22:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513576#M74096</guid>
      <dc:creator>Andyon98</dc:creator>
      <dc:date>2022-06-24T10:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I wait until a button is pressed in a function of another file to return to the main file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513581#M74097</link>
      <description>&lt;P&gt;Maybe this updated example gives more ideas, run it and while pressing the buttons check out log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw_expr = Expr(New Window("2", &amp;lt;&amp;lt; modal,
	Text Box("Second")
	, &amp;lt;&amp;lt; Move Window(0,0)
));

nw = New Window("1", &amp;lt;&amp;lt; modal,
	Button Box("2", 
		nw_expr;
		Show("Continue inside window");
	);
);

Show("Continue outside window");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Jun 2022 10:31:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513581#M74097</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-06-24T10:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I wait until a button is pressed in a function of another file to return to the main file?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513661#M74103</link>
      <description>&lt;P&gt;You need to have the &lt;STRONG&gt;new window()&lt;/STRONG&gt; call in your second file use the &lt;STRONG&gt;&amp;lt;&amp;lt; modal&lt;/STRONG&gt; construct as&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;mentioned.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 12:57:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-wait-until-a-button-is-pressed-in-a-function-of-another/m-p/513661#M74103</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-06-24T12:57:29Z</dc:date>
    </item>
  </channel>
</rss>

