cmake: supernova - missing include_directories() for Jack
[supercollider.git] / Help / Core / Kernel / initClass.html
blobd35661a77e8f01483a6ee2b7957de55c1c89c4d3
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <meta name="Generator" content="Cocoa HTML Writer">
8 <meta name="CocoaVersion" content="949.43">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #0029ae}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
16 p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #882e1b}
17 p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #0000bf}
18 p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000}
19 p.p10 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000; min-height: 12.0px}
20 p.p11 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000000; min-height: 14.0px}
21 span.s1 {color: #0000ff}
22 span.s2 {color: #000000}
23 span.s3 {color: #0029ae}
24 span.s4 {color: #0000bf}
25 span.Apple-tab-span {white-space:pre}
26 </style>
27 </head>
28 <body>
29 <p class="p1"><b>*initClass</b></p>
30 <p class="p2"><br></p>
31 <p class="p3">see also: <a href="Class.html"><span class="s1">Class</span></a></p>
32 <p class="p2"><br></p>
33 <p class="p3">When SuperCollider starts up, just after it has compiled the library, it initializes all the classes from <a href="../Object.html"><span class="s1">Object</span></a> down, a depth first traversal of subclasses.</p>
34 <p class="p2"><br></p>
35 <p class="p3">In this method, any class that requires it may initalize classvars or other resources.</p>
36 <p class="p2"><br></p>
37 <p class="p2"><br></p>
38 <p class="p2"><br></p>
39 <p class="p3">In some cases you will require another class to be initalized before you can initalize your own.<span class="Apple-converted-space">  </span>You may depend on its resources (a classvar).<span class="Apple-converted-space">  </span>This can be accomplished by:</p>
40 <p class="p2"><span class="Apple-tab-span"> </span></p>
41 <p class="p4">YourClass<span class="s2"> {</span></p>
42 <p class="p5"><span class="Apple-tab-span"> </span>*initClass {</p>
43 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s3">Class</span>.initClassTree(<span class="s3">OtherClass</span>);</p>
44 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
45 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>..</p>
46 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
47 <p class="p7"><span class="s2"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>//</p>
48 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
49 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>..</p>
50 <p class="p5"><span class="Apple-tab-span"> </span>}</p>
51 <p class="p6"><span class="Apple-tab-span"> </span></p>
52 <p class="p5"><span class="Apple-tab-span"> </span>..</p>
53 <p class="p6"><span class="Apple-tab-span"> </span></p>
54 <p class="p5">}</p>
55 <p class="p2"><br></p>
56 <p class="p3">Each class will be inited once, and the OtherClass will have all of its subclasses inited before the method returns.</p>
57 <p class="p2"><br></p>
58 <p class="p3">For those methods that need pre-initialized data (such as path names) should defer this function by using <a href="../../Control/StartUp.html"><span class="s1">StartUp</span></a>:</p>
59 <p class="p2"><br></p>
60 <p class="p2"><br></p>
61 <p class="p8">YourClass<span class="s2"> {</span></p>
62 <p class="p9"><span class="Apple-tab-span"> </span>*initClass {</p>
63 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s4">StartUp</span>.add {</p>
64 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>..</p>
65 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>}</p>
66 <p class="p9"><span class="Apple-tab-span"> </span>}</p>
67 <p class="p10"><span class="Apple-tab-span"> </span></p>
68 <p class="p9"><span class="Apple-tab-span"> </span>..</p>
69 <p class="p10"><span class="Apple-tab-span"> </span></p>
70 <p class="p9">}</p>
71 <p class="p11"><br></p>
72 </body>
73 </html>