spreadsheet cell editing



The Statechart design

  1. At the highest level, there are only two states: ACTIVE and QUIT. Inside the ACTIVE state, we are either VIEWING or EDITING. Note how the Statechart now also specifies deleting cell content when BackSpace is pressed in VIEWING as well as in EDITING mode.

  2. The EDITING state takes accepts different kinds of data entered in a cell. It contains the appropriate substates: UNKNOWN, INTEGER, REAL, FORMULA, and STRING.

A prototype implementation

The spreadsheet in action