Removing an old, cherished, yet pointless caveat "This documentation is
[supercollider.git] / Help / OSX / CocoaDialog.html
blobfaa0a86851429776543615be5f79a28e51318afb
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.35">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.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: 9.0px Monaco; min-height: 12.0px}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
14 p.p5 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; min-height: 12.0px}
15 p.p6 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica}
16 p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px}
17 p.p8 {margin: 0.0px 0.0px 0.0px 72.0px; text-indent: -72.0px; font: 12.0px Helvetica}
18 p.p9 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica}
19 p.p10 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #000000}
20 span.s1 {font: 18.0px Helvetica}
21 span.s2 {color: #0000ff}
22 span.s3 {color: #0000bf}
23 span.s4 {color: #606060}
24 span.Apple-tab-span {white-space:pre}
25 </style>
26 </head>
27 <body>
28 <p class="p1"><span class="s1"><b>CocoaDialog<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>file dialogs that utilize OS X Cocoa services</b><span class="s1"><b><span class="Apple-tab-span"> </span></b></span></p>
29 <p class="p2"><br></p>
30 <p class="p1"><b>Inherits from: </b><a href="../Core/Object.html"><span class="s2"><b>Object</b></span></a></p>
31 <p class="p3"><br></p>
32 <p class="p1">OSX only. See <a href="../GUI/GUI-Tools/GUI.html"><span class="s2">GUI</span></a> for cross-platform information.</p>
33 <p class="p2"><br></p>
34 <p class="p1"><b>See also:</b> <a href="../GUI/GUI-Tools/GUI.html"><span class="s2">GUI</span></a>, <a href="Cocoa.html"><span class="s2">Cocoa</span></a></p>
35 <p class="p2"><br></p>
36 <p class="p4"><b>Class Methods</b></p>
37 <p class="p5"><br></p>
38 <p class="p6"><b><span class="Apple-tab-span"> </span>*getPaths (okFunc, cancelFunc, allowsMultiple)</b></p>
39 <p class="p7"><b><span class="Apple-tab-span"> </span></b></p>
40 <p class="p8"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Displays an Open File Dialog. If ok is pressed then <b>okFunc</b> is evaluated withIf cancel is pressed then <b>cancelFunc</b> is evaluated.</p>
41 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>okFunc </b>- A <a href="../Core/Kernel/Function.html"><span class="s2">Function</span></a> to be evaluated when OK is pressed. The selected paths are passed as an Array of Strings as the first argument.<span class="Apple-converted-space"> </span></p>
42 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>cancelFunc </b>- A <a href="../Core/Kernel/Function.html"><span class="s2">Function</span></a> to be evaluated if Cancel is pressed.</p>
43 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>allowsMultiple </b>- A <a href="../Core/Boolean.html"><span class="s2">Boolean</span></a> indicating whether the dialog allows the user to select multiple files. The default is true.</p>
44 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
45 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
46 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s3">CocoaDialog</span>.getPaths({ <span class="s3">arg</span> paths;</p>
47 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>paths.do({ <span class="s3">arg</span> p;</p>
48 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>p.postln;</p>
49 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>})</p>
50 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>},{</p>
51 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s4">"cancelled"</span>.postln;</p>
52 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>});</p>
53 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
54 <p class="p5"><br></p>
55 <p class="p5"><br></p>
56 <p class="p6"><b><span class="Apple-tab-span"> </span>*savePanel (okFunc, cancelFunc)</b></p>
57 <p class="p7"><b><span class="Apple-tab-span"> </span></b></p>
58 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Displays a Save File Dialog.</p>
59 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>okFunc </b>- A <a href="../Core/Kernel/Function.html"><span class="s2">Function</span></a> to be evaluated when OK is pressed. The selected path will be passed as a <a href="../Collections/String.html"><span class="s2">String</span></a> as the first argument.<span class="Apple-converted-space"> </span></p>
60 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>cancelFunc </b>- A <a href="../Core/Kernel/Function.html"><span class="s2">Function</span></a> to be evaluated if Cancel is pressed.</p>
61 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
62 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
63 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s3">CocoaDialog</span>.savePanel({ <span class="s3">arg</span> path;</p>
64 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>path.postln;</p>
65 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>},{</p>
66 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s4">"cancelled"</span>.postln;</p>
67 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>});</p>
68 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
69 <p class="p5"><br></p>
70 </body>
71 </html>