hi, i wrote a small program that allows file input/output from within chuck via OSC. You find it here: http://electro-music.com/forum/topic-21276.html this software can read files only as a whole. so you have to read the whole file before the while loop and store the read values in an array whose element you use inside the while loop. its meant as a workaround until the file input/output UGens arrive in chuck. i compiled it for the mswindows (tested on WinXP/WIN2000) platform but recently it was ported to linux also. Hannes -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
Hello, 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: https://lists.cs.princeton.edu/pipermail/chuck-users/2006-March/000440.html ===================================================================== foo.ck --- public class Foo { /* stuff */ } --- bar.ck --- 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. JPa.
tis 2007-11-06 klockan 18:56 -0800 skrev Juan-Pablo Caceres:
Hello,
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:
https://lists.cs.princeton.edu/pipermail/chuck-users/2006-March/000440.html ===================================================================== foo.ck --- public class Foo { /* stuff */ } ---
bar.ck --- 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.
Try sporking the file with the public class to the VM first, and then sporking the file that uses the class. that should work. Hope that helps, Gasten
Martin Ahnelöv wrote:
Try sporking the file with the public class to the VM first, and then sporking the file that uses the class. that should work.
Hope that helps, Gasten
Thanks Gasten! Yeah thanks, that did it. I hope that they add though a less clumsy way to add external classes/functions/files. Cheers, JPa.
participants (3)
-
Hannes Rieser
-
Juan-Pablo Caceres
-
Martin Ahnelöv