  Class
 
 Array = (struct, length) ->
+ views = null
  class Class
   constructor: ->
    @struct = struct
    @length = length
    @buffer = new ArrayBuffer @struct.bytes * @length
-   @views = []
+   views = @views = []
    for t, i in @struct.types
-    @views[i] = new ArrayTypes[t] @buffer,
+    @views.push new ArrayTypes[t] @buffer,
      @struct.offsets[i] * @length
      @length
 

  get: (i) ->
   if i < 0 or i >= @length
    null
   new @struct null, @views, i

  set: (i, val) ->
   if i < 0 or i >= @length

 Struct: Struct
 Array: Array

if GLOBAL?
 module.exports = TDS
else
 window.TDS = TDS


###
