getPath error when convert called with editor pane out of focus
See original GitHub issueI’m trying to use convertation, an error message shows in Atom with:
markdown-pdf: TypeError: atom.workspace.getActivePaneItem(...).getPath is not a function
. I’m using Atom version 1.16.0 and Windows 10 x64.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
consider using paths instead of keys #1408 - GitHub
This is just an idea. Right now we use the concept of unique "keys" to keep track of the anchor and focus of...
Read more >Convert URL to normal windows filename Java - Stack Overflow
So to convert a URL to File, you would say Paths.get(url.toURI()). ... getPath(); System.out.println(path); // prints: c:\foo bar\baz.jpg.
Read more >File path for Windows standalone build - Unity Forum
Ah alright! So I created a resources directory and moved all of my videos to there. It works in the editor but not...
Read more >Retrieving file information - Android Developers
To get the data type of a shared file given its content URI, the client app calls ContentResolver.getType() . This method returns the...
Read more >How Can I Determine the Path to the Folder Where a Script is ...
For this column we wanted the name of the folder where the script ... Explorer window, a window that has the focus set...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@holic-cl Ok great, thanks for the quick feedback. I’ve tried converting without saving locally and it works fine, however, when I click the tree-view panel before running
convert
, I get the originally reported error.This issue is most likely caused by a loss of focus for the pane containing the file, thus
getPath
is not a function on this pane item (the tree-view). Fix would be a better method for getting the edited file’s path, even when the pane is not in focus. Will have a look at atom docs and see if they have a better function.I’ll continue under the assumption that something like this is what happened in both your cases, until I get a report of it happening somehow else.
Thanks again for the report! 😄
Ok, i remembered why i got this error, was when i tried to use it, and forgot to save the buffer to a file,
The buffer must to be saved to a existing file.