(defregistry name)(defregistry name callback)Defines a registry with the given name. See defregistry* for more information.
Defines a registry with the given name. See defregistry* for more information.
(defregistry* name)(defregistry* name env)(defregistry* name callback env)Defines a registry with the given name. The resulting registry maps names (e.g. screen, view or command names) to definitions (e.g. the definition of a screen, a command or a view).
Definitions in the registry can be looked up using one of the utility functions that are defined implicitly.
(defregistry* 'command) (defregistry* 'command (fn [event entity-name] ...))
will result in the following functions to be defined:
(defn register-command! [name def] ...) (defn unregister-command! [name] ...) (defn registered-commands [] ...) (defn reset-registered-commands! [] ...) (defn resolve-command [name] ...).
Defines a registry with the given name. The resulting registry
maps names (e.g. screen, view or command names) to definitions
(e.g. the definition of a screen, a command or a view).
Definitions in the registry can be looked up using one of the
utility functions that are defined implicitly.
(defregistry* 'command)
(defregistry* 'command
(fn [event entity-name]
...))
will result in the following functions to be defined:
(defn register-command! [name def] ...)
(defn unregister-command! [name] ...)
(defn registered-commands [] ...)
(defn reset-registered-commands! [] ...)
(defn resolve-command [name] ...).(throw-registry-error msg)Throws an error generated by a registry.
Throws an error generated by a registry.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |