[chuck-users] quiting chuck from chuck and saving reference to function
Ge Wang
gewang at CS.Princeton.EDU
Tue Nov 7 19:01:24 EST 2006
Hi!
> A : is it possible to quit Chuck from Chuck? I need to quit chuck when
> a
> certain osc message arrives, and i was wondering if there is a command
> to do this.
In addition to Machine.crash(), huh huh, there is 'me.exit()' which
exits the current shred. This is used in the examples when a HID
device can't be opened. But in theory it can go anywhere.
> B: can i store references to functions in variables? similar to the
> python:
> def myfunc():
> dowhatever
> myvar = myfunc
> myvar()
Currently, no. To achieve the same effect, you will need to use
polymorphic inheritance of classes in ChucK right now.
Hope this helps.
Best,
Ge!
More information about the chuck-users
mailing list