Dev/Config files/Syntax
From XOWA: the free, open-source, offline wiki application
Syntax
- Syntax follows an object-oriented convention.
-
For example,
app.wikis('en.wikipedia.org')
can be expanded to- find an object that accepts the "app" message in the current context
- find an object that accepts the "wikis" message in the "app" context
- pass the last object a message that has one argument with a value of 'en.wikipedia.org'
- Note that instances/methods can return itself. This allows chaining multiple message calls.
-
For example, in
app.wikis.get('en.wikipedia.org').files.cfg_download
, enabled_ and redownload_ both return the cfg_download object. This allows the following call
app.wikis.get('en.wikipedia.org').files.cfg_download .enabled_('y') // returns cfg_download .redownload_('none') // uses the cfg_download from .enabled_ and calls .redownload_ ;
Note that the above is the same as the following:
app.wikis.get('en.wikipedia.org').files.cfg_download.enabled_('y'); app.wikis.get('en.wikipedia.org').files.cfg_download.redownload_('none');
Categories