User Tools

Site Tools


projects:flash:external_data_sources

projects:flash:conceptual design

External Data Sources

External data comes in from these sources:

  1. onScriptLoaded(subject data) - from pages/*.js
    • flash.js switches the page and then passes data to Program object
  2. onLoadData(data) - from an external windows such as Sanskrit Keyboard
    • postMessage: window.addEventListener(“message”, function(e) {
    • flash.js reads the data to generate a new page and then passes data to Program object
  3. from getCards data service
    • directly handled by Program object
  4. from localStorage
    • onstartup
    • when previous session is stored in localStorage

Data Portal:
program.loadData(data)
Card(quest) constructor

The incoming data object is external to the closure compiler, and therefore references to it must use brackets-quoted-string notation.

  1. We first pass the data object to program.loadData().
  2. Here the data is pulled out and loaded into internal objects, and the original external data object is discarded.
  3. The internal objects are then accessed by dot-notation.
projects/flash/external_data_sources.txt · Last modified: 2023/01/12 09:22 by jhagstrand

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki