Closed cfurrow closed 9 years ago
How are you triggering the warning/error from #6? I'm using Atom 0.176.0 and nothing pops up in the Developer Tools log here.
It may have popped up when I first started atom, or perhaps when I tried to either press the key-combo, or from the command palette. The error was in deprecation cop
I'm not familiar with atom package dev, yet, and my PR doesn't really "fix" #6, but it does update at least that other syntax, and I was able to copy again. Now I'm trying to fix line 16
atom.workspaceView.command 'copy-as-rtf:copy', => @copy()
Which is actually firing the deprecation, but the following did not work:
atom.views.getView(atom.workspace).command 'copy-as-rtf:copy', => @copy()
About to hit the api docs again.
Another piece of the docs mention to use the atom.commands.add 'atom-workspace', ...
call to bind commands (https://atom.io/docs/v0.176.0/your-first-package) which sounds more like the canonical syntax for this operation.
Ah, yeah, that seems like it.
That seems to get rid of the deprecation warning, and copying via the key shortcuts works again.
I changed the atom requirement in the packages.json to 0.176.0, because I did not know when this deprecation was added. Do you know of a way to see that info in the api docs?
May have been 0.125.0 when getActiveTextEditor()
was added:
https://github.com/atom/atom/commit/c9e5ff66061788135bcb9ee49640863d1964fa0a#diff-88caa33888e5345667751ee7182b4c36R328
As far as the other command syntax, I don't know.
@cfurrow no idea on how to find that, but I'm merging this anyway. Thanks!
Thanks for the package!