Make RootView listen for events before loading packages

This is because RootView listens to some of its own events. It needs
to be first in line to handle its own events because package event
handlers might rely on tree view's event handlers having been run.
This also brings behavior more in line with what we'll experience in
specs.
This commit is contained in:
Kevin Sawicki & Nathan Sobo
2013-01-09 19:27:02 -07:00
parent 3db7af1edf
commit 06e39595ba

View File

@@ -41,6 +41,7 @@ class RootView extends View
window.rootView = this
@packageStates ?= {}
@packageModules = {}
@handleEvents()
if not projectOrPathToOpen or _.isString(projectOrPathToOpen)
pathToOpen = projectOrPathToOpen
@@ -50,8 +51,6 @@ class RootView extends View
config.load()
@handleEvents()
if pathToOpen
@open(pathToOpen) if fs.isFile(pathToOpen) and not suppressOpen
else