<?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: Self-reference in the hot-spot script (&amp;quot;Set Menu Script&amp;quot;). Is it possible? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Self-reference-in-the-hot-spot-script-quot-Set-Menu-Script-quot/m-p/551599#M76741</link>
    <description>&lt;P&gt;Not sure if there is anything like &amp;lt;&amp;lt; set function for outline boxes and their context menu, but you can use Eval(EvalExpr()) (or other methods, &lt;LI-MESSAGE title="Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute" uid="48998" url="https://community.jmp.com/t5/JSL-Cookbook-Archived/Insert-one-expression-into-another-using-Eval-Insert-Eval-Expr/m-p/48998#U48998" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; ) for quite similar effect&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

names = {"AAAA", "BBBB", "CCCC", "DDDD"};
vlb = V List Box();

For Each({name}, names,
	vlb &amp;lt;&amp;lt; append(ob = Outline Box(name));
	Eval(EvalExpr(ob &amp;lt;&amp;lt; Set Menu Script(
		{"Show my name", Show(Expr(ob) &amp;lt;&amp;lt; get title)}
	)));
);

nw = New Window( "Example", vlb);

(nw &amp;lt;&amp;lt; XPath("//OutlineBox")) &amp;lt;&amp;lt; Get Menu Script;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 01 Oct 2022 15:58:50 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-10-01T15:58:50Z</dc:date>
    <item>
      <title>Self-reference in the hot-spot script ("Set Menu Script"). Is it possible?</title>
      <link>https://community.jmp.com/t5/Discussions/Self-reference-in-the-hot-spot-script-quot-Set-Menu-Script-quot/m-p/551596#M76740</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is self-reference possible in the hot-spot commands ("&amp;lt;&amp;lt; Set Menu Script"), similar to "&amp;lt;&amp;lt;Set Function".&lt;/P&gt;&lt;P&gt;E.g., in the example below I'd like to have a hot-spot commands instead of the buttons:&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 );

names = {"AAAA", "BBBB", "CCCC", "DDDD"};

New Window( "Example",
	For( i = 1, i &amp;lt;= N Items( names ), i++,
		&amp;lt;&amp;lt;append(
			Outline Box( names[i], Button Box( "Show my name", &amp;lt;&amp;lt;Set Function( Function( {self}, Show( (self &amp;lt;&amp;lt; parent) &amp;lt;&amp;lt; get title ) ) ) ), )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;What I'd like to have is something like below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window( "Example",
	For( i = 1, i &amp;lt;= N Items( names ), i++,
		&amp;lt;&amp;lt;append(
			Outline Box( names[i],
				&amp;lt;&amp;lt;Set Menu Script(
					{ "Show my name", &amp;lt;function with reference to self here&amp;gt; },
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Assigning each outline box to variable is not an option. I need to be able to do it dynamically.&amp;nbsp;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:59:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Self-reference-in-the-hot-spot-script-quot-Set-Menu-Script-quot/m-p/551596#M76740</guid>
      <dc:creator>AlterEgo</dc:creator>
      <dc:date>2023-06-09T15:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Self-reference in the hot-spot script ("Set Menu Script"). Is it possible?</title>
      <link>https://community.jmp.com/t5/Discussions/Self-reference-in-the-hot-spot-script-quot-Set-Menu-Script-quot/m-p/551599#M76741</link>
      <description>&lt;P&gt;Not sure if there is anything like &amp;lt;&amp;lt; set function for outline boxes and their context menu, but you can use Eval(EvalExpr()) (or other methods, &lt;LI-MESSAGE title="Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute" uid="48998" url="https://community.jmp.com/t5/JSL-Cookbook-Archived/Insert-one-expression-into-another-using-Eval-Insert-Eval-Expr/m-p/48998#U48998" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; ) for quite similar effect&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

names = {"AAAA", "BBBB", "CCCC", "DDDD"};
vlb = V List Box();

For Each({name}, names,
	vlb &amp;lt;&amp;lt; append(ob = Outline Box(name));
	Eval(EvalExpr(ob &amp;lt;&amp;lt; Set Menu Script(
		{"Show my name", Show(Expr(ob) &amp;lt;&amp;lt; get title)}
	)));
);

nw = New Window( "Example", vlb);

(nw &amp;lt;&amp;lt; XPath("//OutlineBox")) &amp;lt;&amp;lt; Get Menu Script;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 01 Oct 2022 15:58:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Self-reference-in-the-hot-spot-script-quot-Set-Menu-Script-quot/m-p/551599#M76741</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-10-01T15:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Self-reference in the hot-spot script ("Set Menu Script"). Is it possible?</title>
      <link>https://community.jmp.com/t5/Discussions/Self-reference-in-the-hot-spot-script-quot-Set-Menu-Script-quot/m-p/551720#M76750</link>
      <description>&lt;P&gt;Thanks! Excellent, just what I need.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Oct 2022 11:05:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Self-reference-in-the-hot-spot-script-quot-Set-Menu-Script-quot/m-p/551720#M76750</guid>
      <dc:creator>AlterEgo</dc:creator>
      <dc:date>2022-10-02T11:05:19Z</dc:date>
    </item>
  </channel>
</rss>

