[chuck-users] scott may have found a spork bug

Scott Wheeler wheeler at kde.org
Wed Sep 19 20:26:40 EDT 2007

Kassen wrote:
> [...] I don't see why that would affect matters either, this is in 
> reference to the "set" command that also broadcasts a event, right? [...]

It does so in one of the subclasses (the generic one for event 
broadcasting).  Just explaining a little of the logic there:

Every time a control is instantiated it registers itself with the 
ControlDispatcher, which itself is a specialization of the MIDI 
handler.  The base implementation doesn't do anything interesting when 
the control is modified, but in event subclass it broadcasts an event.  
Since all overloads are implicitly polymorphic in ChucK, this Does The 
Right Thing.  In the FooControl it does whatever action is specified in 
the overloaded version.  (This explanation assumes familiarity with OO 
basics -- if any of it isn't clear I can give more details.)

> [...] this wouldn't be the first time things went a little odd when 
> inside of classes and you certainly have no shortage of those here.

Aside from being generally an OOP fan, it certainly makes a lot of the 
things in there a lot easier.



More information about the chuck-users mailing list