Classes | Libraries > JITLib > Environments | Collections > Unordered | Live Coding

EnvironmentRedirect : Object

base class for environment redirects
Subclasses: LazyEnvir


Environment that redirects access (put) and assignment (at). It is used as a base class for redirecting Environments. For example uses, see LazyEnvir and ProxySpace.

Class Methods


Create new environment redirect, if envir is given, it is used as a basis.

replacing Environment class methods

EnvironmentRedirect implements some of the interface of Environment





Inherited class methods

Undocumented class methods


Instance Methods


.envir = argEnvir

return or replace the source environment

e = LazyEnvir.new;
e.put(\x, 9);
e.envir; // look into the envir itself: for a LazyEnvir it contains Maybe as placeholders

redirecting objects

Overriding these methods, one can redirect where objects go when they are assigned to the space. This is done for example in LazyEnvir and ProxySpace.


.put(key, obj)

.localPut(key, obj)



.dispatch = disp

A function or object that is called when the environment is modified. The key and the changed object are passed as arguments.

e = LazyEnvir.new;
e.dispatch = { |key, val| [key, val].postln };
e.put(\x, 9);


add an association

replacing Environment instance methods

EnvironmentRedirect implements some of the interface of Environment, which it can replace where needed.










.keysValuesArrayDo(argArray, function)



.know = flag

.doesNotUnderstand(selector ... args)

Inherited instance methods

Undocumented instance methods

.doFunctionPerform(selector, args)

.linkDoc(doc, pushNow: true)

.putAll( ... dictionaries)

.unlinkDoc(doc, popNow: false)


EnvironmentRedirect and its subclasses can be used to dispatch assignment over a network. To do this, a dispatch function can be supplied - see Public in JITLibExtensions quark.