class library: Reset has been renamed to OnError
[supercollider.git] / SCClassLibrary / JITLib / Patterns / extPostAsCode.sc
bloba1eaaea8e5ab2303091eeebf5e069cd94c4c2570
1 + PatternProxy { 
2                 // like asCompileString, but with full source etc.
3         asCode { 
4                 var mykey = this.key.asCompileString; 
5                 var str;  str = "" ++ this.class.name ++ "(";
6                 
7                 if(source.isNil or: { source == this.class.default }) { 
8                         str = str ++ mykey;
9                 } { 
10                         str = str ++ this.repositoryArgs.asCompileString.drop(1).drop(-1);
11                 };
12                 str = str ++ ")";
13                 
14                 if(this.envir.notNil and: { this.envir.notEmpty }) {
15                         str = str ++ ".set(" ++ 
16                         this.envir.asKeyValuePairs.asCompileString.drop(1).drop(-1) ++ ")"
17                 };
18                 str = str ++ ";"
19                 ^str
20         }       
23 + Tdef { 
24         printOn { |stream| 
25                 ^this.storeOn(stream);
26         }
28 + Pdef { 
29         printOn { |stream| 
30                 ^this.storeOn(stream);
31         }
33 + Pdefn { 
34         printOn { |stream| 
35                 ^this.storeOn(stream);
36         }