<div dir="ltr">Thanks for the reply, Perry. This is indeed what I&#39;ve taken to doing.<div><br></div><div>In the <a href="https://github.com/curtisullerich/computer-music/tree/master/chuck/gametrak">GameTrak wrappers</a> I&#39;ve written I have public classes for Tether, GameTrak, Button, etc, that all extend Event. The abstractions are useful, but it means any script that uses them has to list them in the <a href="http://include.ck">include.ck</a>, and in the correct order, even if the top-level GameTrak is all that is referenced:</div><div><font face="monospace">Machine.add(&quot;external/gametrak/<a href="http://button.ck">button.ck</a>&quot;);<br>Machine.add(&quot;external/gametrak/<a href="http://point.ck">point.ck</a>&quot;);<br>Machine.add(&quot;external/gametrak/<a href="http://tether.ck">tether.ck</a>&quot;);<br>Machine.add(&quot;external/gametrak/<a href="http://gametrak.ck">gametrak.ck</a>&quot;);<br></font><br><div>I&#39;d like to have each ck file declare its imports so users don&#39;t have to know about these internals. Maybe there&#39;s a similar way to do this that I&#39;m not seeing yet.</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 16, 2020 at 7:13 PM Perry Cook &lt;<a href="mailto:prc@cs.princeton.edu">prc@cs.princeton.edu</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">So if I understand you correctly, this is solved fairly easily by a structure we propose in the &quot;ChucK Book”<br><br>1)  Create a file that loads (by Machine.add()) all the classes you think you’ll need.<br><br>2)  As the last line of that, have it Machine.add() a different file, which then<br>either does the work, or adds any file(s) that depend on those initial classes.<br><br>I’ve sometimes even named these files <a href="http://include.ck" target="_blank">include.ck</a> and Main.ck<br>but include also runs Main, so it’s not strictly an “include” or import.<br><br>Hope this helps,<br><br>PRC<br><br><img id="gmail-m_28027999773287188902F84C1B-2F6E-4C7D-BB05-DB31C74C0308" src="cid:173fa390aa251b16b831"></div>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div>