Using Spreadsheets - UNC-Project-Open-AAC/OS-DPI GitHub Wiki

The OS-DPI is designed to pull data from any spreadsheet. There are infinite ways to arrange the data, with each designer coming up with their own ideas.

The Basics

  • Columns define the Fields you intend to use in your UI (e.g., symbol, label, message).
  • Data within the cells define the Values.
  • The Fields (and associated Values) are used to set State variables.
  • A State variable is a variable that is shared among controls. OS-DPI declarative programming for State variables begins with $. For example, $Speak is the default State variable for speech output.
  • A Field (i.e., column of data) named “Speak” has values for each row. Fields begin with #. These #Speak values are used to set $Speak (i.e., the Speak State; what is spoken aloud when a button is selected).
  • Naming conventions may be unique to each design, with some common Fields and likely names.
  • The Content tab in the OS-DPI lists the number of rows of content data and the Fields that are defined. You can explore the content data and approach to organization for each of the demonstration UIs. Go to File > Save Sheet.

Getting Started

  • Begin with a new spreadsheet.
  • Name columns according to the Fields that you want to represent in the UI (e.g., symbol, label, message, pronounce, etc.)
  • Organize the content in separate sheets to prevent unwanted interactions. Although using multiple sheets is a useful way to organize your date, you do not have to use this method.

Demonstration UIs

  1. Single words
  2. Single words with morphs

1. Single words

The intent of this UI is to simulate a dynamic display of a 36 core word board. The content data for this UI includes 36 rows with these Fields: #sheetName, #row, #column, #label, #symbol, #pronounce

The designer of this UI decided to organize the spreadsheet with the row Field defining the row number and the column Field defining the column number. For example, the below spreadsheet indicates that the word and symbol for ‘make’ should be presented on the UI design in the first row/fourth column of the UI grid.

The row and column Fields are ignored if ‘Fill Items’ box is selected in the OS-DPI Layout tab, in which case the content is loaded in the order it is listed in the spreadsheet.

The pronounce Field is used to specify a special pronunciation. In this case, the word ‘it’ is creatively spelled to attempt to represent a southern drawl.


2. Single words with morphs

The intent of this UI is to simulate a dynamic display of a core word board with various forms of the words.

The content for this UI is organized across multiple sheets, including Home, kb (for keyboard), num (for numbers), predict (for prediction data), Morph (for the various forms of the words in the data). Organizing across multiple sheets is not a requirement, but for many UIs it can be an effective approach to managing across categories of data.

The content data for this UI includes 3301 rows with these fields: #sheetName, #role, #row, #column, #morph, #label, #display, #symbol, #changepg, #controls, #pronounce, #case, #changecase, #punctuation, #value, #group

The role Field (i.e., #role) is used to define the content that should be presented on the page. For example, #role = “hp” in this UI. The designer of this UI decided that "hp" would stand for "homepage" to decide the location of the content. Rows and columns (Fields) are included in the spreadsheet to define location in the 10x6 grid.

A label Field (#label) and symbol Field (#symbol) define what should be presented on each button in that row/column location. There is also a display Field (#display) included, with data that is largely consistent with the label Field, but allows differences to be defined between what is presented on the button and what the designer would like to have added to the display window when selected.

The changepg Field (#changepg) is used to define page names and support declarative programming statements that change the page when a Condition is met.

For example, if the button selected has a value (i.e., data) in the corresponding #changepg cell, then change the State variable of the role ($role) to the value in the #changepg cell.

When the button with the #label = “Things” is selected, the role State ($role) is changed to “things" because "things" is the value for the Field changepg.

Taking it further

Let’s look at how the various word morphs are organized in the content data, and programmed in the OS-DPI. On the Home sheet there is a morph Field. This Field is used to note, with a simple “yes” value, if the associated word has additional word forms (i.e., morphs) defined in the content data.

This supports programming that if the Condition is met that there is something defined in the #morph field AND the Condition is met that the State of the lastToken (i.e., $lastToken; last selection made) matches the value in the #display (i.e, display column of data), then change the State of the tabControl ($tabControl) to the “Morph” tab AND change the State of the group ($group) to what was defined in the State of the lastToken.

Let’s look at an example:

When the stop button is selected, the word "stop" is added to the display. The Condition is met that there is data defined in the morph Field for ‘stop’.

Selecting stop again, meets the Condition that there is data in the morph Field AND the $lastToken matches the display field (i.e., the word was selected twice). This triggers the action to change the tabControl State ($tabControl) to Morph and present content data based on the State of the $lastToken (i.e., $group = ‘stop’).