<?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: How to close associated data table with a warning, when chart window is closed ? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/641777#M83879</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&amp;lt;&amp;lt; on close()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is the right place.&lt;BR /&gt;Return 0 if the window should not be closed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt &amp;lt;&amp;lt; Graph Builder(
	&amp;lt;&amp;lt;on close(
		ex = New Window( "message",
			&amp;lt;&amp;lt;Type( "Modal Dialog" ),
			V List Box( 
				Text Box( "close?" ),
				H List Box( Button Box( "OK" ), Button Box( "Cancel" ) ) )
		);
		If( ex["button"] == 1,
			Close( (gb &amp;lt;&amp;lt; Get Data Table), noSave )
		);
		ex["button"] == 1 // don't close the window if the user doesn't press OK
		;
	),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jun 2023 16:15:21 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2023-06-13T16:15:21Z</dc:date>
    <item>
      <title>How to close associated data table with a warning, when chart window is closed ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/641738#M83878</link>
      <description>&lt;P&gt;I want to show a warning dialog to the user when a chart window is closed and close the associated data table (without saving) if the user selects OK and keep both the data table and the chart, if the user selects "Cancel".&lt;/P&gt;&lt;P&gt;The script below is for the dialog box I want, but where do I need to put the statement for closing [if OK] or keeping [if Cancel] the data table?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gb &amp;lt;&amp;lt; On Close(
	New Window( "Are you sure?",
		&amp;lt;&amp;lt;modal,
		V List Box(
			Text Box( "This will close the associated data table" ), 
			H List Box( Button Box( "OK" ), Button Box( "Cancel" ) )
		)
	)["button"] == 1
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 12:16:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/641738#M83878</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-06-13T12:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to close associated data table with a warning, when chart window is closed ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/641777#M83879</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&amp;lt;&amp;lt; on close()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is the right place.&lt;BR /&gt;Return 0 if the window should not be closed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt &amp;lt;&amp;lt; Graph Builder(
	&amp;lt;&amp;lt;on close(
		ex = New Window( "message",
			&amp;lt;&amp;lt;Type( "Modal Dialog" ),
			V List Box( 
				Text Box( "close?" ),
				H List Box( Button Box( "OK" ), Button Box( "Cancel" ) ) )
		);
		If( ex["button"] == 1,
			Close( (gb &amp;lt;&amp;lt; Get Data Table), noSave )
		);
		ex["button"] == 1 // don't close the window if the user doesn't press OK
		;
	),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 16:15:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/641777#M83879</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-13T16:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to close associated data table with a warning, when chart window is closed ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/641939#M83888</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;. I get the following on JMP 16.2.0.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Cannot subscript Display Box in access or evaluation of 'ex[ /*###*/"button"]' , ex[/*###*/"button"]Cannot subscript Display Box in access or evaluation of 'ex[ /*###*/"button"]' , ex[/*###*/"button"]&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Jun 2023 16:07:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/641939#M83888</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-06-13T16:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to close associated data table with a warning, when chart window is closed ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/641942#M83890</link>
      <description>&lt;P&gt;Any reason why you don't use the free upgrade to jmp17?&lt;/P&gt;&lt;P&gt;The new Workflow Builder is really great :)&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;Here a version with&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&amp;lt;&amp;lt;Modal&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which should work on Jmp 16.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt &amp;lt;&amp;lt; Graph Builder(
	&amp;lt;&amp;lt;on close(
		ex = New Window( "message",
			&amp;lt;&amp;lt;Modal,
			V List Box( 
				Text Box( "close?" ),
				H List Box( Button Box( "OK" ), Button Box( "Cancel" ) ) )
		);
		If( ex["button"] == 1,
			Close( (gb &amp;lt;&amp;lt; Get Data Table), noSave )
		);
		ex["button"] == 1 // don't close the window if the user doesn't press OK
		;
	),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 16:21:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/641942#M83890</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-13T16:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to close associated data table with a warning, when chart window is closed ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/642125#M83913</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;Thanks, it works with &amp;lt;&amp;lt; modal.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;SPAN&gt;&amp;nbsp;Any reason why you don't use the free upgrade to jmp17?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We normally test a newer JMP version (for a set duration) on existing JMP scripts before deploying it more widely.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There have been had several backward compatibility&amp;nbsp;issues in the past some of which have not yet been resolved yet.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(I am still learning JMP but there are others who do the testing)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, the upshot is we will move to v17 but it wont happen anytime soon so I only have v16.2 at my disposal at the moment :).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 10:22:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-close-associated-data-table-with-a-warning-when-chart/m-p/642125#M83913</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-06-14T10:22:22Z</dc:date>
    </item>
  </channel>
</rss>

