           #   d: Data for id metric
           #   record: Record
           #   asset: Asset
-
-          constructor: (el) ->
-            return unless el && (i = el.id) && (i = stripPrefix(i, ID+'-'))
+          #   v: Data value
+
+          constructor: (@cell) ->
+            return unless cell && (i = cell.id) && (i = stripPrefix(i, ID+'-'))
             s = i.split '_'
             return if s.length > 1 && isNaN(@i = parseInt(s[1], 10))
             @id = i

            r.find((o) -> o.default)?.run(cell) if Array.isArray(r)
            return

          switch info.t
            when 'name', 'date', 'release'
              saveSlot(cell, info, value)
            when 'rec'
              saveMeasure(cell, info.record, info.metric, value)
            when 'asset'
              saveAsset(cell, info, value)

        editScope = $scope.$new(true)
        editScope.constants = constants

          return

        # Add or replace the text contents of cell c for measure/type m with value v
        generateText = (info, c) ->
          v = info.v
          if info.metric.id == 'name'
            a = info.cell.insertBefore(document.createElement('a'), info.cell.firstChild)
            #a.setAttribute('href', if editing then slot.editRoute() else slot.route())
            a.className = "session icon hint-action-slot"
            #v ?= constants.message('materials.top') if stop
          else if info.metric.id == 'release'
            cn = constants.release[v || 0]
            info.cell.className = cn + ' release icon hint-release-' + cn
            v = ''
          else if v == undefined
            info.cell.classList.add('blank')
            v = info.metric.assumed || ''
          else if info.metric.id == 'classification'
            cn = constants.release[v]
            info.cell.className = cn + ' release icon hint-release-' + cn
            v = ''
          else if info.metric.id == 'excerpt'
            if v
              info.cell.className = 'icon bullet'
            v = ''
          else
            info.cell.classList.remove('blank')
            if info.metric.id == 'id'
              info.cell.className = 'icon ' + if Editing then 'trash' else 'bullet'
              v = ''
            else if info.metric.id == 'age'
              v = display.formatAge(v)
          setCell(info.cell, document.createTextNode(v))
          return

        # Add a td element to tr r with value c and id i
        generateCell = (info) ->
          info.cell = info.row.appendChild(document.createElement('td'))
          if v == null
            info.cell.className = 'null'
          else
            generateText(info)
            info.cell.id = info.id
          return

        generateMultiple = (info) -> # (col, cols, row, i, n, t) ->
          t = Counts[info.i][info.c] || 0
