s-shin / atom-copy-path

Copy a file path flexibly!
https://atom.io/packages/copy-path
MIT License
8 stars 8 forks source link

Uncaught TypeError: atom.workspace.getActivePaneItem(...).getPath is not a function #10

Closed leeyisoft closed 7 years ago

leeyisoft commented 8 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.5.3 System: Mac OS X 10.11.3 Thrown From: copy-path package, v0.4.0

Stack Trace

Uncaught TypeError: atom.workspace.getActivePaneItem(...).getPath is not a function

At /Users/leeyi/.atom/packages/copy-path/lib/index.js:91

TypeError: atom.workspace.getActivePaneItem(...).getPath is not a function
    at _class.getTargetEditorPath (/Users/leeyi/.atom/packages/copy-path/lib/index.js:91:47)
    at _class.copyFullPath (/Users/leeyi/.atom/packages/copy-path/lib/index.js:123:31)
    at atom-workspace.copyPathCopyFullPath (/Users/leeyi/.atom/packages/copy-path/lib/index.js:18:47)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1013:28)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:169:7)

Commands

     -1:50.1.0 encoding-selector:show (div.line)
     -1:44.3.0 tree-view:reveal-active-file (div.line)
  2x -1:40.6.0 spell-check:correct-misspelling (div.line.cursor-line)
     -0:00.6.0 copy-path:copy-full-path (div.package-readme.native-key-bindings)

Config

{
  "core": {
    "disabledPackages": [
      "language-java",
      "language-hyperlink",
      "language-ruby",
      "language-ruby-on-rails",
      "language-toml",
      "language-csharp",
      "wrap-guide",
      "language-clojure",
      "language-coffee-script",
      "erlang-build",
      "language-gfm",
      "keybinding-resolver",
      "language-go",
      "language-objective-c",
      "language-perl"
    ],
    "followSymlinks": true,
    "packagesWithKeymapsDisabled": [
      "atom-alignment"
    ],
    "themes": [
      "atom-light-ui",
      "eiffel-syntax"
    ]
  }
}

Installed Packages

# User
atom-alignment, v0.12.1
copy-path, v0.4.0
css-snippets, v0.9.0
editorconfig, v1.2.4
eiffel-syntax, v0.4.0
language-erlang, v3.0.0
language-swift, v0.4.0
linter, v1.11.3
linter-erlc, v0.3.0

# Dev
No dev packages
bigorangemachine commented 8 years ago

I replicated this issue by trying to do a copy path while doing a find in project (results); I right clicked a tab I wasn't focused on and got this error.

stlbucket commented 7 years ago

+1

rloth commented 7 years ago

+1 in Atom 1.8 on ubuntu

matthewpoer commented 7 years ago

+1, seems to occur when I'm looking at a Settings tab, but want the file path info from an underlying tab.

If I am looking at a "normal" tab of a saved file, I can use the plugin correctly for the active tab or other underlying file tabs.

s-shin commented 7 years ago

This issue will be fixed by #18 and v0.4.2 was released including it.