[chuck-users] imports/includes (Curtis Ullerich)

Perry Cook prc at cs.princeton.edu
Sun Aug 16 22:12:50 EDT 2020


So if I understand you correctly, this is solved fairly easily by a structure we propose in the "ChucK Book”

1)  Create a file that loads (by Machine.add()) all the classes you think you’ll need.

2)  As the last line of that, have it Machine.add() a different file, which then
either does the work, or adds any file(s) that depend on those initial classes.

I’ve sometimes even named these files include.ck and Main.ck
but include also runs Main, so it’s not strictly an “include” or import.

Hope this helps,

PRC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20200816/0878da01/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Listing9.17.ClassLoading.jpeg
Type: image/jpeg
Size: 25372 bytes
Desc: not available
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20200816/0878da01/attachment-0001.jpeg>


More information about the chuck-users mailing list