[chuck-users] adding a chuck class from an external file

Juan-Pablo Caceres jcaceres at ccrma.stanford.edu
Tue Nov 6 21:56:22 EST 2007


Doing some research on how to add a class that is defined in an external 
file I came across an email Ge sent explaining this wasn't possible yet:

public class Foo
{ /* stuff */ }

machine.add( "foo.ck" );
Foo foo;  // this won't pass the type checker

running bar.ck first (the intended usage) would result in a type
checker error 'unknown class Foo', since foo.ck won't be added until
runtime and so 'Foo' is unknown when bar.ck is compiled.

I remember though him also saying that the way to add external functions 
(functions defined in an external file) was to create a classes that 
contains them.

So is there any new way to add a class defined in an external class? 
Your help is greatly appreciated.


More information about the chuck-users mailing list