<?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: Getting an error in a window UI related to the button Box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Getting-an-error-in-a-window-UI-related-to-the-button-Box/m-p/506876#M73666</link>
    <description>&lt;P&gt;At least you are trying to close &lt;EM&gt;response&lt;/EM&gt; window which will be closed when OK or Cancel is pressed as it is a modal window. So removing these lines (if you want to use modal)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;response &amp;lt;&amp;lt; close window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;should get you somewhere.&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jun 2022 20:15:46 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-06-11T20:15:46Z</dc:date>
    <item>
      <title>Getting an error in a window UI related to the button Box</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-an-error-in-a-window-UI-related-to-the-button-Box/m-p/506851#M73665</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a script that depends on a UI to make some selections.&lt;/P&gt;&lt;P&gt;For some reason, the script is giving an error when selecting either the OK or the CANCEL buttons.&lt;/P&gt;&lt;P&gt;Can't figure out why, in a previous iteration it was working.&lt;/P&gt;&lt;P&gt;Any input would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sebasten&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 );
clear log();

P12_DGE=New Table( "Subset of NT191209_P12_DGE",
	Add Rows( 16 ),
	New Column( "symbol",
		Character,
		"Nominal",
		Set Values(
			{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",
			"A", "A"}
		)
	),	
	New Column( "Genelist_concat",
		Character,
		"Multiple Response",
		Set Values(
			{"", "", "", "", "", "", "", "c", "b,c", "a,b", "", "", "", "a", "a", ""}
		)
	),
	New Column( "Log2 TPM_norm to PBS, 0 ug (by specimen_material_type)",
		Numeric,
		"Continuous",
		Format( "Best", 10 ),		
		Set Values(
			[-2.48733482857376, -0.624682475325802, -0.615692449761937,
			1.2902214351926, -2.48733482857376, 0.370997758551945, -1.83635492333803,
			2.37835375673671, -1.83635492333803, -0.116151955497186,
			-1.83635492333803, -1.83635492333803, 0.671865760464638,
			0.133186242337643, -0.09670852998485, -1.83635492333803]
		)
	),
	New Column( "Log2 TPM_median norm",
		Numeric,
		"Continuous",
		Format( "Best", 10 ),
		Set Values(
			[0, 1.86265235324796, 1.87164237881182, 3.77755626376636, 0,
			2.8583325871257, 0, 4.86568858531047, 0, 1.72020296784084, 0, 0,
			3.1592005890384, 1.96954116567567, 1.73964639335318, 0]
		)
	),
	New Column( "Genelist TEST (local",
		Character( 3 ),
		"Nominal",
		Set Values(
			{"", "", "", "", "", "", "", "No", "No", "No", "No", "No", "No", "No",
			"No", "No"}
		)
	),
	Group Columns(
		"TPM data", :"Log2 TPM_norm to PBS, 0 ug (by specimen_material_type)"n, 2
	)
);


TPMls = {"Log2 TPM_norm to PBS, 0 ug (by specimen_material_type)", "Log2 TPM_median norm"};
lbWidth = 208;
pnwidth = 400;
nc = 20;
nloc = 1;
locls = {"Genelist TEST (local"};

uniquegenels = {"a", "b", "c", "d"};

window_UI=expr(
response = New Window( "Hierachical Clustering of Transcritps of interests ",
	&amp;lt;&amp;lt;MODAL,
	Panel Box( "Select TPM type column - Response",
		Text Box( "Select the relevant Log2 normalized TPM data" ),
		Lineup Box( N Col( 3 ), spacing( 5 ),
			colListTPM = Col List Box( &amp;lt;&amp;lt;append( TPMls ), width( pnWidth ), nLines( Min( nc, 2 ) ), "numeric", &amp;lt;&amp;lt;set analysis type( "continuous" ) ),
			Button Box( "TPM", TPM &amp;lt;&amp;lt; Append( colListTPM &amp;lt;&amp;lt; GetSelected ) ),
			TPM = Col List Box( width( lbWidth ), nLines( 1 ), Minitems( 1 ), Maxitems( 1 ), "numeric" )
		)
	),
	Panel Box( "Choose, left or right panel to cluster",
		H List Box(
			Panel Box( "Pick one of more genelist to cluster on",
				V List Box(
					
					Text Box( "Selected Genelist below. Recommend working with a smallish set of genes (&amp;lt;1000)", set wrap( 600 ) ),
					selectuniquegenels = Check Box( uniquegenels )
				)
				
			),
			Panel Box( "Pick a local gene list (Ignore the data filter)",
				V List Box(
					colListlocal = Col List Box( width( pnWidth ), &amp;lt;&amp;lt;append( locls ), nLines( nloc ), "Character" ),
					Button Box( "Local", lcol &amp;lt;&amp;lt; Append( colListlocal &amp;lt;&amp;lt; GetSelected ) ),
					lcol = Col List Box( width( lbWidth ), nLines( 1 ), Maxitems( 1 ), "Character" )
				)
			)
		)
	),
	Spacer Box( size( 20, 10 ) ),
	Panel Box( "Action",
		Lineup Box( N Col( 3 ), spacing( 5 ),
			ex = Button Box( "OK" ),
			Button Box( "Cancel",
				response &amp;lt;&amp;lt; close window;
				Stop()
			),
			Button Box( "Remove column", TPM &amp;lt;&amp;lt; remove selected ),
			ex &amp;lt;&amp;lt; set script(
				today = " " || Char( Format( Today(), "Format Pattern", "&amp;lt;YY&amp;gt;&amp;lt;-&amp;gt;&amp;lt;MM&amp;gt;&amp;lt;-&amp;gt;&amp;lt;DD&amp;gt; &amp;lt;hh24&amp;gt;&amp;lt;:&amp;gt;&amp;lt;mm&amp;gt;" ) ); 
								
				LogTPM_column = TPM &amp;lt;&amp;lt; get items;
				LogTPM_column = Column( LogTPM_column[1] );
				Show( LogTPM_column );
				response &amp;lt;&amp;lt; close window; 
					
				Try(
					l = lcol &amp;lt;&amp;lt; get items;
					Show( l, lcol );
				); 
				
				If( N Items( l ) == 1,
					(//a local gene list has been selected
					P12_DGE &amp;lt;&amp;lt; clear select ; P12_DGE &amp;lt;&amp;lt; select hidden &amp;lt;&amp;lt; hide and exclude( 0 ) ; P12_DGE &amp;lt;&amp;lt; select where( As Column( lcol1 ) != "" )
					 ; P12_DGE &amp;lt;&amp;lt; Name Selection in Column( Column Name( "Genelist Cluster " || today ), Selected( "Yes" ), Unselected( "No" ) ) ;
					genelist_cluster_col = Column( "Genelist Cluster " || today ) ; Show( genelist_cluster_col ) ; P12_DGE &amp;lt;&amp;lt; invert row selection
					 &amp;lt;&amp;lt; hide and exclude)
				,
					(//some global genelist(s) have been selected
					select_uniquegenels = selectuniquegenels &amp;lt;&amp;lt; get selected ; ngenels = N Items( select_uniquegenels ) ;
					Show( ngenels, select_uniquegenels ) ; P12_DGE &amp;lt;&amp;lt; clear select ; P12_DGE &amp;lt;&amp;lt; select hidden &amp;lt;&amp;lt; hide and exclude( 0 ) ;
					For( i = 1, i &amp;lt;= ngenels, i++,
						P12_DGE &amp;lt;&amp;lt; select where( Contains( :Genelist_concat, select_uniquegenels[i] ) )
					) ; P12_DGE &amp;lt;&amp;lt; Name Selection in Column( Column Name( "Genelist Cluster " || today ), Selected( "Yes" ), Unselected( "No" ) ) ;
					genelist_cluster_col = Column( "Genelist Cluster " || today ) ; Show( genelist_cluster_col ) ; P12_DGE &amp;lt;&amp;lt; invert row selection
					 &amp;lt;&amp;lt; hide and exclude)
				)
			)
		)
	)
);
);
window_UI;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:01:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-an-error-in-a-window-UI-related-to-the-button-Box/m-p/506851#M73665</guid>
      <dc:creator>Sburel</dc:creator>
      <dc:date>2023-06-09T17:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error in a window UI related to the button Box</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-an-error-in-a-window-UI-related-to-the-button-Box/m-p/506876#M73666</link>
      <description>&lt;P&gt;At least you are trying to close &lt;EM&gt;response&lt;/EM&gt; window which will be closed when OK or Cancel is pressed as it is a modal window. So removing these lines (if you want to use modal)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;response &amp;lt;&amp;lt; close window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;should get you somewhere.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 20:15:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-an-error-in-a-window-UI-related-to-the-button-Box/m-p/506876#M73666</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-06-11T20:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error in a window UI related to the button Box</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-an-error-in-a-window-UI-related-to-the-button-Box/m-p/506893#M73667</link>
      <description>&lt;P&gt;Hi Jarmo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That did the trick.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sebastien&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 21:56:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-an-error-in-a-window-UI-related-to-the-button-Box/m-p/506893#M73667</guid>
      <dc:creator>Sburel</dc:creator>
      <dc:date>2022-06-11T21:56:14Z</dc:date>
    </item>
  </channel>
</rss>

