Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / examples / other / Exploring_SCLang.scd
blob53543d58a02cd272259861be3933223e438cfce5
2 // some things you can do with the language
4 Magnitude.dumpClassSubtree; // dump class tree of all subclasses of Magnitude
6 Object.dumpClassSubtree; // dump a list of all classes (except metaclasses)
8 Collection.dumpByteCodes('select'); // dump the byte codes for a method
10 UGen.dumpSubclassList
12 Object.browse  // examine methods interactively in a GUI (OSX)
14 Object.dumpFullInterface  // list all methods for the classhierarchically
16 Event.dumpMethodList  // list instance methods alphabetically
18 SinOsc.dumpMethodList  // list class methods alphabetically
23 // find all methods who have an argument name that starts with the letter g.
24 Class.allClasses.do({ arg aClass; 
25         if (aClass.methods.notNil, {
26                 aClass.methods.do({ arg aMethod;
27                         aMethod.argNames.do({ arg aSymbol;
28                                 if ( aSymbol.asString.at(0) == $g, {
29                                         postln(
30                                                 aClass.name.asString ++ " " ++ 
31                                                 aMethod.name.asString ++ " " ++ 
32                                                 aSymbol.asString
33                                         );
34                                 });
35                         })
36                 })
37         })
41 Class.allClasses.printAll; "" // print all the classes in SCClassLib