 
 module.exports = class Wrapper
   constructor: (id) ->
+    @globalState = {}
     @updateRuntimeDataSchedule = false
     @updateInterval = 500 # 0.5s
     @loadConfiguration()

    "getDataset": () =>
      l.info("getDataSet sent by interactive (what to do?)")
    "dataset": (data)=>
      @runtimePhone.post('interactiveStateGlobal', {"#{@globalStateKey}": data})

  interactivePhoneAnswered: ()->
    if @alreadySetupInteractive


  runtimeHandlers: ->
    "loadInteractiveGlobal": (data) =>
      @globalState = JSON.parse(data) if typeof data is 'string'
      myData = @globalState[@globalStateKey]
      if myData
        @interactivePhone.post 'sendDatasetEvent',
          "eventName": 'dataReset'
