errors and warnings / stdlib / E8353
E8353 error
settings.keybinding references a binding not declared with @binding
- area
- stdlib (x8xxx)
- fails the build
- yes
settings.keybinding(name, …) adds a key binding control to your options
page, but no binding of that name is declared in the addon: neither with
@binding from wowlua:bindings nor in the package's own Bindings.xml.
The control would have nothing to bind. Declare the binding, or fix the name.
Example
import * as settings from "wowlua:settings" local control = settings.keybinding("MYADDON_TOGGLE", { label = "Toggle window" })print(control)import * as settings from "wowlua:settings"import binding from "wowlua:bindings" @binding("MYADDON_TOGGLE", { label = "Toggle window" })local function toggleWindow() print("toggle")end local control = settings.keybinding("MYADDON_TOGGLE", { label = "Toggle window" })print(control)The compiler reports it like this:
error[E8353]: `MYADDON_TOGGLE` is not a keybinding of this addon: declare it with `@binding` ┌─ src/main.wowlua:3:37 │ 3 │ local control = settings.keybinding("MYADDON_TOGGLE", { label = "Toggle window" }) │ ^^^^^^^^^^^^^^^^ not declared
Related codes
| code | message |
|---|---|
| E8352 | Invalid keybinding name (must match [A-Z][A-Z0-9_]*) |
Offline
$ wowlua explain E8353 E8353 (error): settings.keybinding references a binding not declared with @binding