 
   addPath: (module, path) ->
     @config_.paths[module] = path;
+
+  setCurrentPath: (path) ->
+    @files_[path] = MKModuleManager.ModuleState.Installed
 
   define: () ->
     # console.log 'define() called!'

      sharedInstance_ = new MKModuleManager
    sharedInstance_

  @ModuleState =
    Loading: 0
    Awaiting: 1
    Installed: 2

  constructor: ->
    # installed modules

        url = @config_.paths[name]
        unless url
          console.log "Invalid url for module '#{name}': #{url}", @config_.paths
          @moduleStates_[name] = MKModuleManager.ModuleState.Failed
          @modules_[name] = { objects: [] }
          @didInstallModule_(null)
          return

        if state = @files_[url]
          if state in [MKModuleManager.ModuleState.Installed, MKModuleManager.ModuleState.Failed]
            console.log "Already downloaded file at url #{url}", @files_
            @moduleStates_[name] = MKModuleManager.ModuleState.Failed
            @modules_[name] = { objects: [] }
            @didInstallModule_(null)
            return
        else
          # console.log 'module ' + name + ' @ URL: ' + url
          @files_[url] = MKModuleManager.ModuleState.Loading
          self = @
          loader = new ModuleLoader url, (error) ->
            if error
              self.files_[url] = MKModuleManager.ModuleState.Failed
              console.log error
            else
              self.files_[url] = MKModuleManager.ModuleState.Installed
              # console.log 'module ' + name + " loaded"
          loader.start()
      else
        # console.log 'already downloading module ' + name

