Compare commits

..

No commits in common. "master" and "old-cocoamenuitem-compatible" have entirely different histories.

37 changed files with 69 additions and 499 deletions

View File

@ -10,7 +10,7 @@
def could_not_locate def could_not_locate
puts "<span style='color:red'>There was a problem</span><br/>" puts "<span style='color:red'>There was a problem</span><br/>"
puts "Probably, you do not have SuperCollider installed, or you are using a non-standard user support directory.<br/><br/>" puts "Probably, you do not have SuperCollider installed, or you are using a non-standard user support directory.<br/><br/>"
puts "You will need to manually link <code>supercollider-tmbundle/Support/classes/TextMate.sc</code> into your SC class path" puts "You will need to manually copy <code>supercollider-tmbundle/Support/classes/TextMate.sc</code> into your SC class path"
end end
puts "=======================================<br/>" puts "=======================================<br/>"
@ -44,7 +44,7 @@ end
<key>keyEquivalent</key> <key>keyEquivalent</key>
<string>$@</string> <string>$@</string>
<key>name</key> <key>name</key>
<string>Complete installation</string> <string>Install</string>
<key>output</key> <key>output</key>
<string>showAsHTML</string> <string>showAsHTML</string>
<key>scope</key> <key>scope</key>

View File

@ -8,8 +8,6 @@ h2. Requirements
A "recent build":http://sourceforge.net/projects/supercollider of SC (>= 3.3 alpha) A "recent build":http://sourceforge.net/projects/supercollider of SC (>= 3.3 alpha)
"TextMate":http://macromates.com, with terminal usage enabled (see Help -> Terminal Usage in TM menu)
h2. Installation h2. Installation
h3. With git h3. With git
@ -22,10 +20,6 @@ h3. With git
@osascript -e 'tell app "TextMate" to reload bundles'@ @osascript -e 'tell app "TextMate" to reload bundles'@
In Textmate menu: Bundles > SuperCollider > Complete installation
h3. Without git h3. Without git
@mkdir -p ~/Library/Application\ Support/TextMate/Bundles@ @mkdir -p ~/Library/Application\ Support/TextMate/Bundles@
@ -42,13 +36,13 @@ h3. Without git
@osascript -e 'tell app "TextMate" to reload bundles'@ @osascript -e 'tell app "TextMate" to reload bundles'@
In Textmate menu: Bundles > SuperCollider > Complete installation h3. After installing
* Open TextMate and select 'SuperCollider' bundle
* Press CMD-SHIFT-F1 to complete installation.
h2. Key controls h2. Key controls
All key controls can be reprogrammed in Bundles editor.
* @ENTER@<br/>Execute current selection/line * @ENTER@<br/>Execute current selection/line
* @CTRL-PERIOD@<br/> * @CTRL-PERIOD@<br/>
@ -75,26 +69,24 @@ Post window to front
* @CMD-SHIFT-C@<br/> * @CMD-SHIFT-C@<br/>
Clear post window Clear post window
* @ALT-CTRL-SHIFT-S@<br/> * @CMD-ALT-CTRL-S@<br/>
Switch to SuperCollider bundle Switch to SuperCollider mode
<br/> <br/>
*plus* various snippets - check the bundle. *plus* various snippets - check the bundle.
h2. Notes h2. Limitations
TextMate does not handle .rtf documents. So .rtf files will have to be copy-and-pasted into .sc text files. This is not a problem for classes. TextMate does not handle .rtf documents. So .rtf files will have to be copy-and-pasted into .sc text files. This is not a problem for classes.
Some controls (browse class file, etc) depend upon TM terminal command (see Help -> Terminal Usage in TM menu)
CMD-period cannot be programmed in TextMate, so to stop audio output use CTRL-period instead CMD-period cannot be programmed in TextMate, so to stop audio output use CTRL-period instead
Class lib can only currently be recompiled from within TextMate (CMD-K) if there's been no previous error compiling it. Recompile from within SC in that case
h2. Notes
I've extracted the underlying code to allow control of SC.app from any command line application.<br/>"sc3ctrl on github":http://github.com/rfwatson/sc3ctrl I've extracted the underlying code to allow control of SC.app from any command line application.<br/>"sc3ctrl on github":http://github.com/rfwatson/sc3ctrl
h2. TODO
Might repackage this as a quark .. ?
h2. Contact me h2. Contact me
Via "github":http://github.com/rfwatson Via "github":http://github.com/rfwatson

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.classVarNames.dump;</string>
<key>name</key>
<string>All Class Vars</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.acvars</string>
<key>uuid</key>
<string>3FC8E89C-7BAF-4C66-9327-C544EBF53DFE</string>
</dict>
</plist>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.instVarNames.dump;</string>
<key>name</key>
<string>All Vars</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.avars</string>
<key>uuid</key>
<string>93CDD123-97D9-40CB-9F63-A6F0A42D8622</string>
</dict>
</plist>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>block {|break|
if (${1:true}) { break.value(${2:nil}) };
}
</string>
<key>keyEquivalent</key>
<string>^~@b</string>
<key>name</key>
<string>Break</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>break</string>
<key>uuid</key>
<string>76D2572D-8E53-4EC8-93C0-2DFADF94E687</string>
</dict>
</plist>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>//
$1.postln;
//
</string>
<key>name</key>
<string>BugNumbers</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>n.</string>
<key>uuid</key>
<string>4C6C9C58-92F3-4FD2-AE39-00F01AC3F7B2</string>
</dict>
</plist>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>Post &lt;&lt; "$TM_SELECTED_TEXT: " &lt;&lt; $TM_SELECTED_TEXT &lt;&lt; "\n";
</string>
<key>keyEquivalent</key>
<string>~@p</string>
<key>name</key>
<string>Print Variable</string>
<key>scope</key>
<string>source.supercollider</string>
<key>uuid</key>
<string>C94CF802-251A-44FE-87CB-4C50FA4D4D02</string>
</dict>
</plist>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>while({${1:condition}}, {
${2:do}
});</string>
<key>name</key>
<string>While...</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>while</string>
<key>uuid</key>
<string>D3FF72CE-4B17-47E2-8A3A-E2E4A6BAC859</string>
</dict>
</plist>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.any { |${1:i}tem, $1|
$2
};</string>
<key>name</key>
<string>.any</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.any</string>
<key>uuid</key>
<string>DF09CE07-5704-4932-8DC7-86A1ECE54401</string>
</dict>
</plist>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.collect({|${1:i}tem, $1| $2 })
</string>
<key>name</key>
<string>.collect</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.collect</string>
<key>uuid</key>
<string>36B59028-5F9E-4023-B0CB-46BA991E4A0F</string>
</dict>
</plist>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>every { |${1:i}tem, $1|
$2
};</string>
<key>name</key>
<string>.every</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.every</string>
<key>uuid</key>
<string>43EED273-EF78-473E-8BF0-650D2FC19CCA</string>
</dict>
</plist>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.get(${1:0}, {|msg| ${2:msg.postln}});</string>
<key>name</key>
<string>.get</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.get</string>
<key>uuid</key>
<string>43E979D3-9639-4DCC-9E57-24A5C72A30F1</string>
</dict>
</plist>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.isNil </string>
<key>name</key>
<string>.isNil</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.n</string>
<key>uuid</key>
<string>ABFD1872-DD86-4099-B758-28E319EF479D</string>
</dict>
</plist>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.notNil</string>
<key>name</key>
<string>.notNil</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.nn</string>
<key>uuid</key>
<string>A138C3A1-AEF7-4C4A-AD57-80B0564A61A8</string>
</dict>
</plist>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.select({|${1:i}tem, $1| $2 })
</string>
<key>name</key>
<string>.select</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.select</string>
<key>uuid</key>
<string>A29A295B-A0A4-4E8E-B144-802098C5D806</string>
</dict>
</plist>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.set(\\${1:arg}, ${2:val});</string>
<key>name</key>
<string>.set</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.set</string>
<key>uuid</key>
<string>AB35A021-A800-4B82-B603-295CFD714A5B</string>
</dict>
</plist>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>switch ($1)
{$2} {$3}
{$4} {$5};
</string>
<key>name</key>
<string>case copy</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>switch</string>
<key>uuid</key>
<string>A2B8FE76-A086-4FD3-B832-7154B7CE88F4</string>
</dict>
</plist>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>case
{$1} {$2}
{$3} {$4};
</string>
<key>name</key>
<string>case</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>case</string>
<key>uuid</key>
<string>44331733-E717-4546-BA68-C254284E1089</string>
</dict>
</plist>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.dumpAllMethods;</string>
<key>name</key>
<string>dumpAllMethods</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.dm</string>
<key>uuid</key>
<string>78E00F80-2133-42C8-94E8-C570693BEC8E</string>
</dict>
</plist>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.dumpInterface;</string>
<key>name</key>
<string>dumpInterface</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.di</string>
<key>uuid</key>
<string>533A6101-A0FB-4F3B-A94A-E04A8DC46C0F</string>
</dict>
</plist>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>if(${1:condition}) {
${2:true}
};</string>
<key>name</key>
<string>if ...</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>if</string>
<key>uuid</key>
<string>44E4E852-1518-4E8C-84F1-9990A1B910ED</string>
</dict>
</plist>

View File

@ -13,7 +13,7 @@
<key>scope</key> <key>scope</key>
<string>source.supercollider</string> <string>source.supercollider</string>
<key>tabTrigger</key> <key>tabTrigger</key>
<string>ife</string> <string>if</string>
<key>uuid</key> <key>uuid</key>
<string>C0F1C9B0-6393-4B2B-86B4-40010363DCDE</string> <string>C0F1C9B0-6393-4B2B-86B4-40010363DCDE</string>
</dict> </dict>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>interpolation:</string>
<key>name</key>
<string>interpolation</string>
<key>tabTrigger</key>
<string>int</string>
<key>uuid</key>
<string>D36563CB-A0CE-43EB-8F19-2EF1D5E42B81</string>
</dict>
</plist>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>.makeBundle(${1:0.2}, {
$2
});</string>
<key>name</key>
<string>makeBundle</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>.mb</string>
<key>uuid</key>
<string>66B16E22-D3FB-464F-B820-2FEEFD79DBA5</string>
</dict>
</plist>

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>${1:Classname} : ${2:Object} {
*new { $3
^super.new.init$4;
}
init { $5
$6
}
}</string>
<key>name</key>
<string>Class</string>
<key>scope</key>
<string>source.supercollider</string>
<key>tabTrigger</key>
<string>class</string>
<key>uuid</key>
<string>7581E1DB-6946-44BB-B836-6F5CE5E99B55</string>
</dict>
</plist>

View File

@ -3,7 +3,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>content</key> <key>content</key>
<string>.postln;</string> <string>.postln</string>
<key>name</key> <key>name</key>
<string>.postln</string> <string>.postln</string>
<key>scope</key> <key>scope</key>

View File

@ -23,39 +23,36 @@ TextMate {
}; };
try { try {
menu = SCMenuGroup(nil, "TextMate", 7); menu = CocoaMenuItem(nil, 7, "TextMate", true);
opt = SCMenuItem(menu, "TextMate to front") opt = CocoaMenuItem(menu, 0, "TextMate to front", false) {
.action_{
"osascript << END "osascript << END
tell application \"TextMate\" to activate tell application \"TextMate\" to activate
END END
".unixCmd(postOutput: false) ".unixCmd(postOutput: false)
} };
.setShortCut("T"); opt.setShortCut("T");
SCMenuSeparator(menu); openClassInTextMate = CocoaMenuItem(menu, 1, "Open class files in TextMate", false) { |item|
openClassInTextMate = SCMenuItem(menu, "Open class files in TextMate")
.action_{ |item|
item.state = item.state.not; item.state = item.state.not;
this.saveState; this.saveState;
} };
.state_(settings.classfiles); openClassInTextMate.state = settings.classfiles;
openReferencesInTextMate = SCMenuItem(menu, "Open references in TextMate") openReferencesInTextMate = CocoaMenuItem(menu, 2, "Open references in TextMate", false) { |item|
.action_{ |item|
item.state = item.state.not; item.state = item.state.not;
this.saveState; this.saveState;
} };
.state_(settings.references); openReferencesInTextMate.state = settings.references;
SCMenuSeparator(menu, 4); CocoaMenuItem(menu, 3, "About SuperCollider bundle", false) { |item|
Document.new.string = "TextMate-SuperCollider bundle
SCMenuItem(menu, "About SuperCollider bundle") by R.Watson
.action_{ |item|
"open 'http://github.com/rfwatson/supercollider-tmbundle'".unixCmd(postOutput:false); For documentation and source code,
} http://rfwatson.github.com"
};
} { } {
"TextMate found a problem installing CocoaMenuItems - you may be running SC 3.2 or older, or booting from command-line.".warn "TextMate found a problem installing CocoaMenuItems - you may be running SC 3.2 or older, or booting from command-line.".warn
} }
@ -64,20 +61,12 @@ TextMate {
// adapted from http://github.com/rfwatson/sc3ctrl // adapted from http://github.com/rfwatson/sc3ctrl
SC3Controller { SC3Controller {
classvar nodes, <>matePath; classvar nodes;
*initClass { *initClass {
nodes = List[]; nodes = List[];
Platform.case(\osx) { Platform.case(\osx) {
var whichMate = "which mate".unixCmdGetStdOut;
if(whichMate.isEmpty){
matePath = "/usr/local/bin/mate";
} {
matePath = whichMate;
};
StartUp.add { StartUp.add {
this.addListeners; this.addListeners;
} }
@ -92,7 +81,7 @@ SC3Controller {
}; };
if(nodes.isEmpty) { if(nodes.isEmpty) {
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/cmd') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/cmd') { |t, r, msg|
{ {
thisThread.clock = SystemClock; thisThread.clock = SystemClock;
msg[1].asString.interpretPrint; msg[1].asString.interpretPrint;
@ -101,14 +90,14 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/help') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/help') { |t, r, msg|
{ {
msg[1].asString.openHelpFile; msg[1].asString.openHelpFile;
}.defer }.defer
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/class') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/class') { |t, r, msg|
// TM version only // TM version only
var fname, cmd; var fname, cmd;
var klass = msg[1].asString; var klass = msg[1].asString;
@ -124,14 +113,11 @@ SC3Controller {
var content = f.readAllString; var content = f.readAllString;
var split = content.split($:); var split = content.split($:);
if("^[0-9]+$".matchRegexp(split.first.asString)) { if("^[0-9]+$".matchRegexp(split.first.asString)) {
(matePath ++ " -l"++ split.first + "\"" ++ fname ++ "\"").unixCmd(postOutput: false); ("mate -l" ++ split.first + "\"" ++ fname ++ "\"").unixCmd(postOutput: false);
} { } {
(matePath ++ " -l1 \"" ++ fname ++ "\"").unixCmd(postOutput: false); ("mate -l1 \"" ++ fname ++ "\"").unixCmd(postOutput: false);
}
}; };
f.close;
};
}); });
} }
} { // open in SC.app } { // open in SC.app
@ -141,7 +127,7 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/implementations') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/implementations') { |t, r, msg|
if(TextMate.openReferencesInTextMate.state) { if(TextMate.openReferencesInTextMate.state) {
{ this.methodTemplates(msg[1], true) }.defer { this.methodTemplates(msg[1], true) }.defer
} { // open in SC.app } { // open in SC.app
@ -150,7 +136,7 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/references') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/references') { |t, r, msg|
if(TextMate.openReferencesInTextMate.state) { if(TextMate.openReferencesInTextMate.state) {
{ this.methodReferences(msg[1], true) }.defer { this.methodReferences(msg[1], true) }.defer
} { // open in SC.app } { // open in SC.app
@ -159,12 +145,12 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/stop') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/stop') { |t, r, msg|
thisProcess.stop; nil; thisProcess.stop; nil;
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/clear') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/clear') { |t, r, msg|
{ {
Document.listener.string = ""; ""; Document.listener.string = ""; "";
postToFront.(); postToFront.();
@ -172,12 +158,12 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/postfront') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/postfront') { |t, r, msg|
{ postToFront.() }.defer; { postToFront.() }.defer;
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/recompile') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/recompile') { |t, r, msg|
{ {
thisProcess.recompile; thisProcess.recompile;
postToFront.(); postToFront.();
@ -234,7 +220,7 @@ SC3Controller {
fname = "/tmp/" ++ Date.seed ++ ".sc"; fname = "/tmp/" ++ Date.seed ++ ".sc";
File.use(fname, "w") { |f| File.use(fname, "w") { |f|
f << out.collection.asString; f << out.collection.asString;
(matePath + fname).unixCmd(postOutput: false); ("mate" + fname).unixCmd(postOutput: false);
}; };
} { } {
out.collection.newTextWindow(name.asString); out.collection.newTextWindow(name.asString);
@ -257,7 +243,7 @@ SC3Controller {
fname = "/tmp/" ++ Date.seed ++ ".sc"; fname = "/tmp/" ++ Date.seed ++ ".sc";
File.use(fname, "w") { |f| File.use(fname, "w") { |f|
f << out.collection.asString; f << out.collection.asString;
(matePath + fname).unixCmd(postOutput: false); ("mate" + fname).unixCmd(postOutput: false);
}; };
} { } {
out.collection.newTextWindow(name.asString); out.collection.newTextWindow(name.asString);

View File

@ -21,38 +21,38 @@ SC3Controller {
}; };
if(nodes.isEmpty) { if(nodes.isEmpty) {
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/cmd') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/cmd') { |t, r, msg|
msg[1].asString.interpretPrint; msg[1].asString.interpretPrint;
{ postToFront.() }.defer; { postToFront.() }.defer;
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/help') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/help') { |t, r, msg|
{ msg[1].asString.openHelpFile }.defer { msg[1].asString.openHelpFile }.defer
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/class') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/class') { |t, r, msg|
{ msg[1].asString.interpret.openCodeFile }.defer { msg[1].asString.interpret.openCodeFile }.defer
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/implementations') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/implementations') { |t, r, msg|
{ SC3Controller.methodTemplates(msg[1]) }.defer { SC3Controller.methodTemplates(msg[1]) }.defer
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/references') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/references') { |t, r, msg|
{ SC3Controller.methodReferences(msg[1]) }.defer { SC3Controller.methodReferences(msg[1]) }.defer
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/stop') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/stop') { |t, r, msg|
thisProcess.stop; thisProcess.stop;
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/clear') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/clear') { |t, r, msg|
{ {
Document.listener.string = ""; ""; Document.listener.string = ""; "";
postToFront.(); postToFront.();
@ -60,12 +60,12 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/postfront') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/postfront') { |t, r, msg|
{ postToFront.() }.defer; { postToFront.() }.defer;
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/recompile') { |t, r, msg| node = OSCresponderNode(nil, '/sc3ctrl/recompile') { |t, r, msg|
{ {
thisProcess.recompile; thisProcess.recompile;
postToFront.(); postToFront.();

View File

@ -11,7 +11,7 @@
<key>foldingStopMarker</key> <key>foldingStopMarker</key>
<string>\}|\*\/</string> <string>\}|\*\/</string>
<key>keyEquivalent</key> <key>keyEquivalent</key>
<string>^~S</string> <string>^~@s</string>
<key>name</key> <key>name</key>
<string>SuperCollider</string> <string>SuperCollider</string>
<key>patterns</key> <key>patterns</key>

View File

@ -25,7 +25,6 @@
<string>59AA6C90-F786-434B-B10E-DA608EFBC824</string> <string>59AA6C90-F786-434B-B10E-DA608EFBC824</string>
<string>89218E54-78ED-4C0B-92C9-8FEC7E3B2664</string> <string>89218E54-78ED-4C0B-92C9-8FEC7E3B2664</string>
<string>8FA2A21C-E1C9-41AE-AEAB-7FF573747A7C</string> <string>8FA2A21C-E1C9-41AE-AEAB-7FF573747A7C</string>
<string>7581E1DB-6946-44BB-B836-6F5CE5E99B55</string>
<string>2635D12B-F4B6-45B6-8BA4-B50215737165</string> <string>2635D12B-F4B6-45B6-8BA4-B50215737165</string>
<string>FD6AB222-41B0-4851-AE06-D91F5422D7E1</string> <string>FD6AB222-41B0-4851-AE06-D91F5422D7E1</string>
<string>BA4AE872-4314-4D57-B2C6-6A66CCC5F55E</string> <string>BA4AE872-4314-4D57-B2C6-6A66CCC5F55E</string>
@ -39,27 +38,6 @@
<string>293C4F9B-E1A4-4D01-83E7-0698112C7FA4</string> <string>293C4F9B-E1A4-4D01-83E7-0698112C7FA4</string>
<string>3BAE7DE4-D06A-422B-94A3-7F542C47ED0F</string> <string>3BAE7DE4-D06A-422B-94A3-7F542C47ED0F</string>
<string>22917CBF-054E-49ED-8AFA-7B72C0CFFA3A</string> <string>22917CBF-054E-49ED-8AFA-7B72C0CFFA3A</string>
<string>A138C3A1-AEF7-4C4A-AD57-80B0564A61A8</string>
<string>ABFD1872-DD86-4099-B758-28E319EF479D</string>
<string>BB37ACE9-8262-4AF6-B3C6-43DC0AF2B370</string>
<string>D36563CB-A0CE-43EB-8F19-2EF1D5E42B81</string>
<string>43E979D3-9639-4DCC-9E57-24A5C72A30F1</string>
<string>AB35A021-A800-4B82-B603-295CFD714A5B</string>
<string>3FC8E89C-7BAF-4C66-9327-C544EBF53DFE</string>
<string>93CDD123-97D9-40CB-9F63-A6F0A42D8622</string>
<string>4C6C9C58-92F3-4FD2-AE39-00F01AC3F7B2</string>
<string>D3FF72CE-4B17-47E2-8A3A-E2E4A6BAC859</string>
<string>DF09CE07-5704-4932-8DC7-86A1ECE54401</string>
<string>44331733-E717-4546-BA68-C254284E1089</string>
<string>A2B8FE76-A086-4FD3-B832-7154B7CE88F4</string>
<string>78E00F80-2133-42C8-94E8-C570693BEC8E</string>
<string>533A6101-A0FB-4F3B-A94A-E04A8DC46C0F</string>
<string>43EED273-EF78-473E-8BF0-650D2FC19CCA</string>
<string>44E4E852-1518-4E8C-84F1-9990A1B910ED</string>
<string>66B16E22-D3FB-464F-B820-2FEEFD79DBA5</string>
<string>C94CF802-251A-44FE-87CB-4C50FA4D4D02</string>
<string>36B59028-5F9E-4023-B0CB-46BA991E4A0F</string>
<string>A29A295B-A0A4-4E8E-B144-802098C5D806</string>
</array> </array>
<key>uuid</key> <key>uuid</key>
<string>7613A472-3FAB-454C-8CF2-2E62F0D00920</string> <string>7613A472-3FAB-454C-8CF2-2E62F0D00920</string>