<?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: Data table screen size set by JSL script is not always saved with .jmp file in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/268287#M52235</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hey Hadley, Craige, and JMP Community– &amp;nbsp;I believe I've tracked the issue down to a bug in my code. &amp;nbsp;I had originally noted that I had also&amp;nbsp;tried using &lt;CODE class="  language-jsl"&gt;Set Content Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt; instead of &lt;CODE class="  language-jsl"&gt;Set Window Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;. &amp;nbsp;But, in fact, my original code on both the Mac and Windows&amp;nbsp;sides were using &lt;CODE class="  language-jsl"&gt;Set Content Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;, and I had only recently transitioned the Mac code over to using&amp;nbsp;&lt;CODE class="  language-jsl"&gt;Set Window Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;— (probably as part of my&amp;nbsp;effort to debug this issue). &amp;nbsp;But now, after&amp;nbsp;also&amp;nbsp;applying&amp;nbsp;&lt;CODE class="  language-jsl"&gt;Set Window Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;to the Windows code, I find that the window size is persistent and always as expected when the file is opened. &amp;nbsp;Likely, the reason I didn't make this connection sooner was that &lt;CODE class="  language-jsl"&gt;Set Content Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;seemingly works just as well for this purpose in a Mac environment, and that's&amp;nbsp;where I do most of my development.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 22 May 2020 06:13:33 GMT</pubDate>
    <dc:creator>SteveTerry</dc:creator>
    <dc:date>2020-05-22T06:13:33Z</dc:date>
    <item>
      <title>Data table screen size set by JSL script is not always saved with .jmp file</title>
      <link>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/267507#M52081</link>
      <description>&lt;P&gt;I find that, when I set the window size of a data table with JSL, then save it out, there's at least one mode where the window size settings don't seem to have been saved with the .jmp file. &amp;nbsp;Instead, it seems that the window size settings from the last manually saved settings, (i.e., via the UI), are used for (or saved with) the .jmp file. &amp;nbsp;The following code is made up of snippets from my JSL script, so has not been tested by itself, but is representative:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
window = Get Window( dt );
window &amp;lt;&amp;lt; Set Window Size( 1300, 700 );&lt;BR /&gt;dt &amp;lt;&amp;lt; &lt;SPAN&gt;Save&lt;/SPAN&gt;( &lt;SPAN&gt;"myTable&lt;/SPAN&gt;&lt;SPAN&gt;.jmp"&lt;/SPAN&gt; );
dt &amp;lt;&amp;lt; Close Window;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have also tried using &lt;CODE class=" language-jsl"&gt;Set Content Size()&lt;/CODE&gt; instead of &lt;CODE class=" language-jsl"&gt;Set Window Size()&lt;/CODE&gt;, and it seems to behave the same way. &amp;nbsp;(It's not clear to me from the docs which is more appropriate for this purpose; &amp;nbsp;perhaps someone could comment on the specific difference between the two.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am experiencing this behavior running JMP 14.2 under Windows 7. &amp;nbsp;However, I notice that, with Mac OS (running 14.3), I'm not able to reproduce the issue, and the JMP table window sizes always get saved as expected by the JSL script. &amp;nbsp;This makes me wonder whether there might be any User Preferences settings that are overriding the script's parameters. &amp;nbsp;(I've encountered this before with &lt;CODE class=" language-jsl"&gt;Open()&lt;/CODE&gt;.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only other discussion I could find on this subject generally was &lt;A title="Screen Size" href="https://community.jmp.com/t5/Discussions/screen-size/td-p/85965" target="_self"&gt;screen size&lt;/A&gt;, but it does not seem to be directly relevant.&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>Mon, 18 May 2020 19:34:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/267507#M52081</guid>
      <dc:creator>SteveTerry</dc:creator>
      <dc:date>2020-05-18T19:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Data table screen size set by JSL script is not always saved with .jmp file</title>
      <link>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/267619#M52106</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe this is a Windows issue, but here is a workaround:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dt &amp;lt;&amp;lt; New Script(
"OnOpen", // create the script
window = Get Window( Current Data Table() );
window &amp;lt;&amp;lt; Set Window Size( 1300, 700 );
);
dt &amp;lt;&amp;lt; Save( "myTable.jmp" );
dt &amp;lt;&amp;lt; Close Window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please try this and let me know if it works for you.&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 08:43:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/267619#M52106</guid>
      <dc:creator>HadleyMyers</dc:creator>
      <dc:date>2020-05-19T08:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Data table screen size set by JSL script is not always saved with .jmp file</title>
      <link>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/268081#M52192</link>
      <description>&lt;P&gt;Hi Hadley– that's a very clever workaround! &amp;nbsp;I wasn't aware that JMP will automatically run a script named 'OnOpen' if it finds it upon opening a data table file. &amp;nbsp;It's a very nice feature, and I'm starting to think of other, unrelated applications of its use!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before I accept this as a solution, I'd like to find out if this is a known issue with JMP 14 running on Windows, and, if so, has it been addressed in JMP 15 or planned for JMP 16. &amp;nbsp;If you or one of your colleagues could find that out, that would be very helpful.&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 06:01:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/268081#M52192</guid>
      <dc:creator>SteveTerry</dc:creator>
      <dc:date>2020-05-21T06:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Data table screen size set by JSL script is not always saved with .jmp file</title>
      <link>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/268086#M52193</link>
      <description>&lt;P&gt;JMP keeps a list of recent window positions/sizes (in the Windows registry, separate from the size in the table) so it can reopen scripts and tables in the same location and size as before.&amp;nbsp; They compete with whatever the table knows about its preferred size.&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/1492"&gt;@jschroedl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 09:33:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/268086#M52193</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-05-21T09:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Data table screen size set by JSL script is not always saved with .jmp file</title>
      <link>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/268287#M52235</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hey Hadley, Craige, and JMP Community– &amp;nbsp;I believe I've tracked the issue down to a bug in my code. &amp;nbsp;I had originally noted that I had also&amp;nbsp;tried using &lt;CODE class="  language-jsl"&gt;Set Content Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt; instead of &lt;CODE class="  language-jsl"&gt;Set Window Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;. &amp;nbsp;But, in fact, my original code on both the Mac and Windows&amp;nbsp;sides were using &lt;CODE class="  language-jsl"&gt;Set Content Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;, and I had only recently transitioned the Mac code over to using&amp;nbsp;&lt;CODE class="  language-jsl"&gt;Set Window Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;— (probably as part of my&amp;nbsp;effort to debug this issue). &amp;nbsp;But now, after&amp;nbsp;also&amp;nbsp;applying&amp;nbsp;&lt;CODE class="  language-jsl"&gt;Set Window Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;to the Windows code, I find that the window size is persistent and always as expected when the file is opened. &amp;nbsp;Likely, the reason I didn't make this connection sooner was that &lt;CODE class="  language-jsl"&gt;Set Content Size&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;seemingly works just as well for this purpose in a Mac environment, and that's&amp;nbsp;where I do most of my development.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 06:13:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Data-table-screen-size-set-by-JSL-script-is-not-always-saved/m-p/268287#M52235</guid>
      <dc:creator>SteveTerry</dc:creator>
      <dc:date>2020-05-22T06:13:33Z</dc:date>
    </item>
  </channel>
</rss>

