Next: , Up: BindingDictionary


1.10.1 BindingDictionary: accessing

define: aSymbol
Define aSymbol as equal to nil inside the receiver. Fail if such a variable already exists (use #at:put: if you don't want to fail)


doesNotUnderstand: aMessage
Try to map unary selectors to read accesses to the Namespace, and one-argument keyword selectors to write accesses. Note that: a) this works only if the selector has an uppercase first letter; and b) `aNamespace Variable: value' is the same as `aNamespace set: #Variable to: value', not the same as `aNamespace at: #Variable put: value' — the latter always refers to the current namespace, while the former won't define a new variable, instead searching in superspaces (and raising an error if the variable cannot be found).


environment
Answer the environment to which the receiver is connected. This can be the class for a dictionary that holds class variables, or the super-namespace. In general it is used to compute the receiver's name.


environment: anObject
Set the environment to which the receiver is connected. This can be the class for a dictionary that holds class variables, or the super-namespace. In general it is used to compute the receiver's name.


import: aSymbol from: aNamespace
Add to the receiver the symbol aSymbol, associated to the same value as in aNamespace. Fail if aNamespace does not contain the given key.


name
Answer the receiver's name, which by default is the same as the name of the receiver's environment.


nameIn: aNamespace
Answer the receiver's name when referred to from aNamespace; by default the computation is deferred to the receiver's environment.