WatchList:
Filter:
Classes (extension) | Classes

WatchList : Object
ExtensionExtension

a dynamic list of items.
Source: WatchList.sc

Description

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).

NOTE: ToDo : selection of subsets by offset and size

First code examples:

Class Methods

basic creation

WatchList.new(object, getFunc, keepGone: true, skip: true, halo: true)

basic creation of a new WatchList.

Arguments:

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

convenience creation

create watchlists for some typical objects with proper getFuncs. arguments are the same as above minus getFunc: object, keepGone, skip, halo

WatchList.envir(envir, keepGone: true, skip: true, halo: true)

for environments, gets keys

WatchList.proxy(proxy, keepGone: true, skip: true, halo: true)

for nodeproxies, Ndef, Tdef, Pdef

WatchList.spaceAr(space, keepGone: true, skip: true, halo: true)

for proxyspaces, gets ar proxies

WatchList.spaceKr(space, keepGone: true, skip: true, halo: true)

for proxyspaces, gets ar proxies

Inherited class methods

Instance Methods

.list

the list of items in order

.object

.object = obj

get and set the object to watch

.getFunc

.getFunc = value

the func by which to ask the object for its items

.keepGone

.keepGone = value

(unused) flag whether to keep old names in list or not.

.update

update the list

.skip

skipjack to update list automagically

.clear(update: true)

clear the list

Inherited instance methods

Examples