[chuck-users] Class Libraries, File Naming Conventions, and 'machine.add(...)'

Mike McGonagle mjmogo at gmail.com
Wed Mar 29 13:46:02 EST 2006


Since the release of, I have been working with miniAudicle,
and I really like what I see so far (up to this point, I had been
using the commandline version of ChucK). So, I am not sure if there is
a separate email list for the miniAudicle, or if I should send the
email here, or to the Audicle list... so...

One thing that I am trying to do is set up my Class Libraries in a
fashion where I point miniAudicle to the root directory, and I put my
stuff into a directory structure as follows:


Where 'Package' represents a folder of my libraries, 'ClassLibrary' is
the name of the particular library, and the 'Make.ck' file is used to
load the individual library files in the order needed by calling
'machine.add(...)' on each of the files.

In doing this, I was hoping to be able to enter the following in my
program file so that the Mask library gets loaded:


So, this works when I have just this line in a file, and all the class
files get loaded in the proper order. BUT, once I put any additional
code into this file, it will not load the class files at all (and this
was after restarting the miniAudicle to ensure that there wasn't any
conflict with previously loaded classes).

Here are the issues that I see so far...

(1) Would it be possible to allow for miniAudicle to have multiple
paths that it would search for finding these libraries?

(2) Am I using 'machine.add(...)' for its intended purpose (in loading
classes)? Might there be a good reason to add another
'machine.load(...)' that does the same thing as 'add', except it does
not spork a new shread for each call? This 'load' function could also
be made to keep track of what files have been loaded, and any time
there is a file that gets loaded more than once, any subsequent loads
could just be ignored? (This might also change the miniAudicle
interfact to include a button to load, in addition to the other
buttons.) Would this function be best named 'load'/'include'/'import'?
Which one?

(3) Any thoughts on why the classes do not load when I have subsequent
code in my program (after the 'machine.add')?

I could send you an example of what I am trying to do, but this would
require sending out my libraries, and I would prefer to sent those out
as archives so that the directory structure is maintained.


More information about the chuck-users mailing list