class library: Volume - remove debug message
[supercollider.git] / SCClassLibrary / SCDoc / Help.sc
blobeadb0f1553fcc5dd08341397a26bad4e0f41d906
1 Help {
2         // These classvars and vars are part of the deprecated Help.tree stuff. When that stuff is removed from the classlib, this can be removed too.
3         classvar <global, categoriesSkipThese;
4         classvar <filterUserDirEntries, <>cachePath;
5         var     tree, fileslist, <root;
9         *gui {
10                 HelpBrowser.instance.goHome;
11         }
12         *dir {
13                 ^SCDoc.helpTargetDir
14         }
15     *methodArgs {|string|
16         var class, meth, f, m;
17         f = string.findRegexp("(\\w*)\\.(\\w+)").flop[1];
18         if(f.notNil) {#class, meth = f[1..]} {
19             if(string[0].isUpper) {
20                 class = string;
21                 meth = \new;
22             } {
23                 meth = string;
24             }
25         };
26         f = {|m,c|
27             class = (c ?? {m.ownerClass}).name;
28             class = if(class.isMetaClassName) {class.asString[5..]++" *"} {class.asString++" -"};
29             class++m.name++" ("++m.argNames[1..].collect {|n,i|
30                 n.asString++":"+m.prototypeFrame[i+1];
31             }.join(", ")++")";
32         };
33         class = class.asSymbol.asClass;
34         if(class.notNil) {
35             m = class.class.findRespondingMethodFor(meth.asSymbol);
36             ^if(m.notNil) {f.value(m,class.class)} {""};
37         } {
38             ^Class.allClasses.reject{|c|c.isMetaClass}.collect {|c|
39                 c.findMethod(meth.asSymbol);
40             }.reject{|m|m.isNil}.collect {|m|
41                 f.value(m);
42             }.join($\n);
43         }
44     }