-
Notifications
You must be signed in to change notification settings - Fork 4
/
deprecated-3.5.sc
69 lines (54 loc) · 1.21 KB
/
deprecated-3.5.sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
MultiPageLayout : PageLayout {
*new { arg ... args;
this.deprecated(thisMethod);
^PageLayout(*args)
}
}
// move these to main pending-deprecated-3.6.sc
+ PageLayout {
layRight { arg w, h;
this.deprecated(thisMethod)
^Rect(0, 0, w, h)
}
}
// these were a bad idea since bounds and layout could easily be swapped
// and this would hide the error by treating the point/rect as a layout
+ Point {
asPageLayout {
^PageLayout("", this.asRect ).front
}
}
+ Rect {
asPageLayout {
^PageLayout("", this ).front
}
}
+ Instr {
// this is a tilda delimited version of the name
asSingleName {
this.deprecated(thisMethod);
^String.streamContents({ arg s;
name.do({ arg n, i;
if(i > 0, { s << $~ });
s << n;
})
})
}
*singleNameAsNames { arg singleName;
this.deprecated(thisMethod);
^singleName.asString.split($~).collect({ arg n; n.asSymbol })
}
}
+ Object {
die { arg ... culprits;
"\n\nFATAL ERROR:\n".postln;
culprits.do({ arg c; if(c.isString, {c.postln}, {c.dump}) });
this.dump;
Error("FATAL ERROR").throw;
}
checkKind { arg shouldBeKindOf;
if(this.isKindOf(shouldBeKindOf).not, {
Error("Type check failed:" + this + "should be kind of:" + shouldBeKindOf).throw;
})
}
}