idiom for requiring a class file?
More questions: What's the proper ChucK idiom for automagically loading a class file from a file that uses that class? I can manually add MyClass.ck to the VM before loading the calling file, but that doesn't seem particularly scalable. Is there an idiom that is equivalent to "include" or "require" in other languages? - Rob
Rob,
I think the best we have is Machine.add
http://chuck.cs.princeton.edu/doc/language/spork.html#add
A common strategy is to have a library file of Machine.adds
http://www.iua.upf.es/~gcoleman/chuck/svn/lib.ck
Graham
On Wed, Feb 18, 2009 at 7:41 PM, Robert Poor
More questions:
What's the proper ChucK idiom for automagically loading a class file from a file that uses that class?
I can manually add MyClass.ck to the VM before loading the calling file, but that doesn't seem particularly scalable. Is there an idiom that is equivalent to "include" or "require" in other languages?
- Rob
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (2)
-
Graham Coleman
-
Robert Poor