       </div>
     """
 
-    @isDead = 0
+    @dead = 0
     @pending = [] # lines to execute: AtInputPrompt consumes one item from the queue, HadError empties it
     @w3500 = null # window for 3500⌶
     @host = @port = @wsid = ''; prefs.title @updateTitle.bind @

      '*spawnedError': ({message}) =>
        @die(); delay 100, -> $.alert message, 'Error'; return # give the window a chance to restore its original dimensions
        return
      '*disconnected': => (if !@isDead then $.alert 'Interpreter disconnected', 'Error'; @die()); return
      Disconnect: ({message}) =>
        if !@isDead
          @die()
          if message == 'Dyalog session has ended'
            (try close()); D.process?.exit? 0


  setHostAndPort: (@host, @port) -> @updateTitle(); return

  emit: (x, y) -> @dead || D.socket.emit x, y; return
  WI: -> @emit 'WeakInterrupt'; return
  SI: -> @emit 'StrongInterrupt'; return

  die: -> # don't really, just pretend
    if !@dead then @dead = 1; @$ide.addClass 'disconnected'; for _, widget of @wins then widget.die()
    return

  updateTitle: -> # add updateTitle() as a change listener for preference "title"
