wv-settings
| (require wv-settings) |
Settings wrapper used by the webview library.
This module exports the wv-settings% class, which provides a small object-oriented interface over an ini settings backend. Settings are accessed relative to a context.
1 Overview
A wv-settings% object combines:
an ini settings object
a symbol identifying the settings context
Keys used in this class are symbols.
2 Class: wv-settings%
constructor
(new wv-settings% [ini ini] [wv-context wv-context]) → (is-a?/c wv-settings%) ini : (is-a?/c ini%) wv-context : symbol? Creates a settings wrapper.ini must provide compatible get and set! methods. wv-context is the context symbol used for contextual settings access.
Returns the value associated with key in the current context.If no default value is supplied, the call delegates to:
(send ini get wv-context key)
If a default value is supplied, only the first extra argument is used, and the call delegates to:
(send ini get wv-context key default)
Stores value under key in the current context.Delegates to:
method
(send a-wv-settings get/global key default-value ...) → any/c key : symbol? default-value : any/c Returns the value associated with key in the global settings section.If no default value is supplied, the call delegates to:
(send ini get 'global key)
If a default value is supplied, only the first extra argument is used, and the call delegates to:
(send ini get 'global key default)
Stores value under key in the global settings section.Delegates to:
Creates a new wv-settings% object sharing the same ini backend but using context as its context.Returns the current context symbol.