 
   setViewState: (options = {}) ->
 
+    {dock}           = KD.singletons
     {behavior, name} = options
 
     html     = document.documentElement

    else KDView.setElementClass html, 'remove', 'app'

    if isApp or name in appsWithDock
    then @getView().showDock()
    else @getView().hideDock()

      KDView.setElementClass body, 'add', name
      previousClass = name


  mainTabPaneChanged:(mainView, pane)->

