           if app then button.enable() else button.disable()
 
       CSSEditor.ready =>
+
         CSSEditor.codeMirrorEditor.on "change", \
           _.debounce (@lazyBound 'previewCss', no), 500
+
+        CSSEditor.on "RunRequested", @lazyBound 'previewCss', yes
+        CSSEditor.on "AutoRunRequested", toggleAutoRun
+
 
   previewApp:(force = no)->
 

    options.cssClass = 'devtools-editor'
    super options, data

    @_mode   = "coffeescript"
    @storage = KD.singletons.localStorageController.storage "DevTools"

  loadLastOpenFile:->

    path = @storage.getAt "lastFileOn#{@_mode}"
    return  unless path

    lastOpenFile = FSHelper.createFileFromPath path
    lastOpenFile.fetchContents (err, content)=>
      if err
        KD.showError err, "Failed to load last open file: #{path}"
      else
        # Override the path to keep VM Info
        lastOpenFile.path = path

            callback            : => @compileApp()
          }
          {
            title               : "Run as I type"
            cssClass            : "solid #{if @liveMode then 'green' else 'live'}"
            callback            : =>

