[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-dev] SF.net SVN: supercollider:[8271] trunk/build/SCClassLibrary/Common/Control/ Server.sc
Revision: 8271
http://supercollider.svn.sourceforge.net/supercollider/?rev=8271&view=rev
Author: jrhb
Date: 2008-12-24 12:47:12 +0000 (Wed, 24 Dec 2008)
Log Message:
-----------
for reasons of backward compatibility with other possibly unknown libraries, now Server uses set as global storage again. "all" is the recommended getter though.
Modified Paths:
--------------
trunk/build/SCClassLibrary/Common/Control/Server.sc
Modified: trunk/build/SCClassLibrary/Common/Control/Server.sc
===================================================================
--- trunk/build/SCClassLibrary/Common/Control/Server.sc 2008-12-24 01:15:29 UTC (rev 8270)
+++ trunk/build/SCClassLibrary/Common/Control/Server.sc 2008-12-24 12:47:12 UTC (rev 8271)
@@ -185,7 +185,7 @@
}
Server : Model {
- classvar <>local, <>internal, <>default, <>named, <>all, <>program;
+ classvar <>local, <>internal, <>default, <>named, <>set, <>program;
var <name, <>addr, <clientID=0;
var <isLocal, <inProcess, <>sendQuit, <>remoteControlled;
@@ -216,6 +216,9 @@
^super.new.init(name, addr, options, clientID)
}
+ *all { ^set }
+ *all_ { arg dict; set = dict }
+
init { arg argName, argAddr, argOptions, argClientID;
name = argName;
addr = argAddr;
@@ -227,7 +230,7 @@
remoteControlled = isLocal;
serverRunning = false;
named.put(name, this);
- all.add(this);
+ set.add(this);
this.newAllocators;
Server.changed(\serverAdded, this);
volume = Volume.new(server: this, persist: true);
@@ -260,7 +263,7 @@
Class.initClassTree(ServerOptions);
Class.initClassTree(NotificationCenter);
named = IdentityDictionary.new;
- all = Set.new;
+ set = Set.new;
default = local = Server.new(\localhost, NetAddr("127.0.0.1", 57110));
Platform.switch(\windows, {
program = "scsynth.exe";
@@ -515,7 +518,7 @@
^aliveThread.notNil and: {aliveThread.isPlaying}
}
*resumeThreads {
- all.do({ arg server;
+ set.do({ arg server;
server.stopAliveThread;
server.startAliveThread(server.aliveThreadPeriod);
});
@@ -620,13 +623,13 @@
}
*quitAll {
- all.do({ arg server;
+ set.do({ arg server;
if ((server.sendQuit === true)
or: { server.sendQuit.isNil and: { server.remoteControlled }}) {
server.quit
};
})
- // all.do({ arg server; if(server.isLocal or: {server.inProcess} ) {server.quit}; })
+ // set.do({ arg server; if(server.isLocal or: {server.inProcess} ) {server.quit}; })
}
*killAll {
// if you see Exception in World_OpenUDP: unable to bind udp socket
@@ -644,18 +647,13 @@
this.initTree;
}
*freeAll {
- all.do({ arg server;
+ set.do({ arg server;
if(server.remoteControlled, { // debatable?
server.freeAll;
})
})
}
- // backwards compatibility
-
- *set { ^all }
- *set_ { arg dict; all = dict }
-
// bundling support
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
_______________________________________________
sc-dev mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/