sQu1rr / nerd-treeview

Vim-like NERD Tree behaviour for Atom.io Tree View
https://atom.io/packages/nerd-treeview
MIT License
19 stars 5 forks source link

Uncaught TypeError: paneItem.getPath is not a function #1

Closed averrin closed 9 years ago

averrin commented 9 years ago

[Enter steps to reproduce below:]

  1. Select tree view
  2. Select file
  3. Press 'o'

Atom Version: 1.0.15 System: Ubuntu 15.04 Thrown From: nerd-treeview package, v0.1.0

Stack Trace

Uncaught TypeError: paneItem.getPath is not a function

At /home/user/.atom/packages/nerd-treeview/lib/nerd-treeview.coffee:61

TypeError: paneItem.getPath is not a function
  at Object.module.exports.open (/home/user/.atom/packages/nerd-treeview/lib/nerd-treeview.coffee:61:48)
  at HTMLOListElement.atom.commands.add.nerd-treeview:open (/home/user/.atom/packages/nerd-treeview/lib/nerd-treeview.coffee:8:39)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:245:29)
  at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:184:20)

Commands

  3x -0:09.0 tree-view:toggle-focus (atom-text-editor.editor.is-focused.vim-mode.normal-mode)
     -0:06.5.0 core:move-down (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:05.6.0 core:move-up (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
  3x -0:04.5.0 core:move-down (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:01.6.0 nerd-treeview:open (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Config

{
  "core": {
    "themes": [
      "accents-ui",
      "base16-tomorrow-dark-theme"
    ],
    "disabledPackages": [
      "web-browser",
      "gulp-control",
      "tool-bar-main",
      "atom-jade",
      "spell-check",
      "seti-icons",
      "atom-color-highlight",
      "local-history",
      "project-view",
      "tool-bar",
      "toolbar-basic",
      "background-tips",
      "image-view",
      "language-csharp",
      "linter-tidy",
      "deprecation-cop",
      "linter-python-pyflakes",
      "autocomplete-python",
      "opened-files",
      "hyperclick",
      "symbols-tree-view",
      "symbol-gen",
      "symbols-view"
    ],
    "excludeVcsIgnoredPaths": false
  }
}

Installed Packages

# User
Stylus, v1.2.1
accents-ui, v1.0.0
atom-ctags, v4.3.0
atom-handlebars, v1.2.0
atom-jinja2, v0.5.0
atomatigit, v1.5.4
autocomplete-paths, v1.0.2
autocomplete-plus-python-jedi, v0.3.6
color-picker, v2.0.11
color-picker-service, v0.0.1
color-tabs, v0.1.8
color-tabs-regex, v0.2.2
emmet, v2.3.12
file-icons, v1.6.9
foldername-tabs, v0.1.5
git-hide, v0.1.2
highlight-selected, v0.10.1
javascript-snippets, v1.0.0
language-diff, v0.3.1
language-javascript-better, v1.5.0
language-javascript-jsx, v0.3.7
last-cursor-position, v0.9.0
linter, v1.6.0
linter-jscs, v3.0.0
linter-jshint, v1.2.0
linter-pep8, v1.0.1
linter-pylama, v0.2.0
minimap, v4.13.3
minimap-bookmarks, v0.1.0
minimap-git-diff, v4.1.8
minimap-highlight-selected, v4.3.0
minimap-pigments, v0.1.6
nerd-treeview, v0.1.0
pigments, v0.15.0
process-palette, v0.5.1
python-iresolve, v0.0.3
python-tools, v0.6.5
sync-settings, v0.6.0
time-status, v1.1.0
underline-trailing-whitespace, v1.4.0
vim-mode, v0.60.0
wakatime, v4.1.0

# Dev
No dev packages
sQu1rr commented 9 years ago

Hm. I'm kind of new to atom.io and coffeescript to be honest. Seems that we can have panes that are not text editors, can you let me know which of the plugins you use create panes (if that makes any sense)

test-fix-pane-getpath branch might do the trick but I do need to somehow reproduce the issue first to be able to test. Interestingly enough on the brand new atom installation with all your plugins everything seems to work. Maybe settings? I used gentoo linux with atom 1.0.11, will try 15 later today. more debugging info will definitely help, especially the content of atom.workspace.getActivePane().getItems()

averrin commented 9 years ago

Still reproduce, but u r right - only with opened settings pane

sQu1rr commented 9 years ago

Please try now - I just published the patched version

averrin commented 9 years ago

Yeah, thanks, fixed!=)