A WatchList tracks dynamic collections of items and keeps them in a list in historical order. Examples of such collections include:
* keys in an Environment, e.g. a ProxySpace;
* parameter names (controlKeys) of processes like Ndef, Tdef, Pdef
The main argument for historical order is that this is more location-stable that e.g. alphabetic order. When adding processes and parameters by live coding, the locations of parameters on physical controllers remain the same (as long as there is space for more), creating less distraction than changing orders based on alphabet (or order of \control.kr calls when rewriting an Ndef).
First code examples:
basic creation of a new WatchList.
object |
the object to watch |
getFunc |
the function fr getting a list of items from object |
keepGone |
not used yet: flag whether to keep or remove old names. |
skip |
flag whether to add a skipjack for watching |
halo |
flag whether to add watchlist to object halo |
create watchlists for some typical objects with proper getFuncs. arguments are the same as above minus getFunc: object, keepGone, skip, halo
for environments, gets keys
for nodeproxies, Ndef, Tdef, Pdef
for proxyspaces, gets ar proxies
for proxyspaces, gets ar proxies
the list of items in order
get and set the object to watch
the func by which to ask the object for its items
(unused) flag whether to keep old names in list or not.
update the list
skipjack to update list automagically
clear the list