-
Notifications
You must be signed in to change notification settings - Fork 86
settings ref
Chris Petersen edited this page Oct 16, 2014
·
1 revision
settings-ref returns the value of a setting, returning the fallback if no matching key or #f if also no fallback specified.
Parameter | Description |
---|---|
key | The settings key |
fback | Optional: The fallback value if no matching key key is found |
Example 1: Initialize the settings file and retrieve and store some settings values
;; Make sure we have a config directory
(let ((configdirectory (string-append (system-directory) (system-pathseparator) "config")))
(if (not (file-exists? configdirectory))
(create-directory configdirectory)))
;; Initialize the settings file
(settings-init (list (cons "Localization" 1)
(cons "SensorLocations" (list "Ear" "Hand" "Foot"))))
;; Retrieve and store some settings values
(display (settings-ref "Localization")) (newline)
(define username "demo")
(if (string? username) (settings-set! "Username" username))
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip