 
     q = y*z[0][0]
 
-    #console.log "y", y
-
-    #y = [[1, 2, 3, 4, 5, 6],[6, 5, 4, 3, 2, 1]]
-
-    #console.log "y", y
-    #console.log "q", q
-
-    ## post code
-
     console.log "######## post-code ########"
 
-    # update stuff
-
+    console.log "#### sheets ####"
     for s of $blab.sheet
         $blab.sheet[s].fromLocal(eval(s))
-
+        console.log $blab.sheet[s].stringify()
+
+    console.log "#### tables ####"
     for t of $blab.table
         $blab.table[t].update()
-
-    #console.log "blab-figure", $blab.figure
+        console.log $blab.table[t].stringify()
+
+    console.log "#### figures ####"
     for f of $blab.figure
-        #console.log "start", f
         $blab.figure[f].update()
-        #console.log "stop", f
+        console.log $blab.figure[f].stringify()
 
 compute()
 

        container = $("[data-sym=#{@spec.id}][data-type='table']")[0]

        @defaults =
            data: @sheet.data
            afterChange: (change, source) =>
                compute() if source is "edit" and @spec.compute
            columns: ({type: 'numeric'} for k in [1..@sheet.data[0].length])
            rowHeaders: @sheet.rowHeaders
            colHeaders: @sheet.colHeaders
            contextMenu: false

        @table = new Handsontable container, $.extend({}, @defaults, @spec.table)

    update: ->
        @table.loadData @sheet.data
        @table.render()
        


        @report.val @slider.slider("value")

    update: ->
        @sheet.spec.data[0][0] =  @slider.slider("value")
   
## From GUI

# sheets

$blab.sheet = []
sh = (id, data) -> new Sheet {id:id, data:data, compute: true}

$blab.sheet =
    A: sh "A", [[1,2],[3,4]]
