     # update stuff
     # 
     for s of $blab.sheet
-        eval("$blab.sheet['" + s + "'].data = " + s)
-        #$blab.sheet[s].fromLocal()
+        $blab.sheet[s].fromLocal(eval(s))
 
     for t of $blab.table
         $blab.table[t].update()

    y: sh "y", [[30, 200, 100, 400, 150, 250],[50,  20,  10,  40,  15,  25]]
    z: sh "z", [[50]]
    q: sh "q", [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]]

$blab.sheet['y'].rowHeaders = ['dA','dB']
$blab.sheet['y'].colHeaders = ['i','ii','iii','iv','v','vi']

# slider

slid = (id) -> new Slider $blab.sheet[id], {id:id , width: 500}
$blab.slider =
    z: slid "z"

# tables

tab = (id) -> new Table {id:id}
$blab.table =
    A: tab "A"
    x: tab "x"


class Sheet
    
    constructor: (@spec, @data, @colHeaders, @rowHeaders) ->

        @data ?= [[0]]
        numCols = @data[0].length
        numRows = @data.length

        @colHeaders ?= ("c#{k}" for k in [0...numCols])
        @rowHeaders ?= ("r#{k}" for k in [0...numRows])

    rowJson: ->
        x = {}
