seveibar / text-pastry

Advance pasting for Atom.io
https://atom.io/packages/text-pastry
MIT License
4 stars 2 forks source link

Uncaught TypeError: atom.workspace.append is not a function #19

Open duhow opened 8 years ago

duhow commented 8 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.5.4 System: Unknown Windows Version Thrown From: text-pastry package, v0.6.1

Stack Trace

Uncaught TypeError: atom.workspace.append is not a function

At /C:/Users/duhow/.atom/packages/text-pastry/lib/text-pastry-view.coffee:86

TypeError: atom.workspace.append is not a function
    at TextPastryView.module.exports.TextPastryView.custom_range (file:///C:/Users/duhow/.atom/packages/text-pastry/lib/text-pastry-view.coffee:60:26)
    at atom-workspace.<anonymous> (file:///C:/Users/duhow/.atom/packages/text-pastry/lib/text-pastry-view.coffee:19:77)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\src\command-registry.js:260:29)
    at C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\src\command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\command-palette\lib\command-palette-view.js:183:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\src\command-registry.js:260:29)
    at C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\src\command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:570:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:378:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\src\window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (C:\Users\duhow\AppData\Local\atom\app-1.5.4\resources\app.asar\src\window-event-handler.js:3:61)

Commands

  2x -3:50.3.0 window:toggle-dev-tools (atom-text-editor.editor.is-focused)
     -0:51.1.0 command-palette:toggle (a.inline-block)
  4x -0:49.4.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:47.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:47.4.0 settings-view:install-packages-and-themes (a.inline-block)
     -0:45.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:16.6.0 bracket-matcher:select-inside-brackets (atom-text-editor.editor.is-focused)
     -0:15 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:12.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:12.2.0 text-pastry:custom-range (atom-text-editor.editor)
  2x -0:03.6.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:02.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:00.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:00.5.0 text-pastry:custom-range (atom-text-editor.editor)

Config

{
  "core": {}
}

Installed Packages

# User
linter, v1.11.3
linter-xmllint, v1.3.4
text-pastry, v0.6.1

# Dev
No dev packages
sstoops commented 8 years ago

I'm getting this error too with 1.5.4

swieder227 commented 8 years ago

I see this error whenever using the "Custom Range" paste command. Using Atom 1.8.0 and Text Pastry 0.6.1.

Looks like the Atom API deprecated atom.workspace.append(), which Text Pastry is using here.

We'll have to figure out what the author was attempting to do and re-write it with supported API methods.

I'm new to Atom Package development, but hey -- this is what Open Source is all about. If I find time, I'll try to figure this out and do a PR.

ldexterldesign commented 7 years ago

+1