<?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 Button box prevents relative filepath from working in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Button-box-prevents-relative-filepath-from-working/m-p/76390#M36078</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was messing around and discovered something strange. If I save the below script into the same folder as the 'Config File.jmp" file and then try to run it, the following error is produced when i press the button to open the config file: "Error with file: Path is invalid: \Config File.jmp."&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;F_Open  = function({columntoread},{defaultlocal},
	Open("Config File.jmp")
);

new window("test",
	buttonbox("go",
		script(
			F_Open("Directories");
		);
	);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Yet if I just run the line "Open("Config File.jmp")"&amp;nbsp; from within the script without moving any files around, the data table opens fine.&lt;/P&gt;&lt;P&gt;Also, if I change the relative filepath to the full filepath, ie "C:\....\Config.File.jmp", suddenly the button box works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea why this is happening???&lt;/P&gt;</description>
    <pubDate>Fri, 28 Sep 2018 12:20:49 GMT</pubDate>
    <dc:creator>DannyORegan94</dc:creator>
    <dc:date>2018-09-28T12:20:49Z</dc:date>
    <item>
      <title>Button box prevents relative filepath from working</title>
      <link>https://community.jmp.com/t5/Discussions/Button-box-prevents-relative-filepath-from-working/m-p/76390#M36078</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was messing around and discovered something strange. If I save the below script into the same folder as the 'Config File.jmp" file and then try to run it, the following error is produced when i press the button to open the config file: "Error with file: Path is invalid: \Config File.jmp."&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;F_Open  = function({columntoread},{defaultlocal},
	Open("Config File.jmp")
);

new window("test",
	buttonbox("go",
		script(
			F_Open("Directories");
		);
	);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Yet if I just run the line "Open("Config File.jmp")"&amp;nbsp; from within the script without moving any files around, the data table opens fine.&lt;/P&gt;&lt;P&gt;Also, if I change the relative filepath to the full filepath, ie "C:\....\Config.File.jmp", suddenly the button box works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea why this is happening???&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 12:20:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Button-box-prevents-relative-filepath-from-working/m-p/76390#M36078</guid>
      <dc:creator>DannyORegan94</dc:creator>
      <dc:date>2018-09-28T12:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Button box prevents relative filepath from working</title>
      <link>https://community.jmp.com/t5/Discussions/Button-box-prevents-relative-filepath-from-working/m-p/78276#M36369</link>
      <description>&lt;P&gt;Anybody??&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 07:25:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Button-box-prevents-relative-filepath-from-working/m-p/78276#M36369</guid>
      <dc:creator>DannyORegan94</dc:creator>
      <dc:date>2018-10-08T07:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Button box prevents relative filepath from working</title>
      <link>https://community.jmp.com/t5/Discussions/Button-box-prevents-relative-filepath-from-working/m-p/78360#M36399</link>
      <description>&lt;P&gt;Looks like the function doesn't know the current directory.&amp;nbsp; Try this code, which passes the current directory into the function as an argument:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;F_Open  = function({columntoread, current_path},{defaultlocal},
	Open(current_path || "Config File.jmp");
);
curpath = get default directory();
new window("test",
	buttonbox("go",
		script(
			F_Open("Directories", curpath);
		);
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Oct 2018 14:46:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Button-box-prevents-relative-filepath-from-working/m-p/78360#M36399</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2018-10-08T14:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Button box prevents relative filepath from working</title>
      <link>https://community.jmp.com/t5/Discussions/Button-box-prevents-relative-filepath-from-working/m-p/78539#M36445</link>
      <description>&lt;P&gt;This does indeed work. Any idea though why the relative filepathing wasn't working the way it usually does?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 08:09:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Button-box-prevents-relative-filepath-from-working/m-p/78539#M36445</guid>
      <dc:creator>DannyORegan94</dc:creator>
      <dc:date>2018-10-10T08:09:08Z</dc:date>
    </item>
  </channel>
</rss>

