You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 24, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 24, 2018. It is now read-only.
Error thrown when attempting to split panes on about screen #30
Run a "Pane: Split (direction) And Copy Active Item" command
Atom Version: 1.7.4 System: Microsoft Windows 8.1 Enterprise Thrown From: Atom Core
Stack Trace
Uncaught Error: The workspace can only contain one instance of item [object Object]
At ...\Atom\resources\app.asar\src\item-registry.js:11
Error: The workspace can only contain one instance of item [object Object]
at ItemRegistry.module.exports.ItemRegistry.addItem (...\Atom\resources\app.asar\src\item-registry.js:11:15)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (...\Atom\resources\app.asar\src\pane-container.js:387:25)
at ...\Atom\resources\app.asar\src\pane-container.js:366:19
at ...\Atom\resources\app.asar\src\pane-container.js:97:16
at Function.module.exports.Emitter.simpleDispatch (...\Atom\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (...\Atom\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
at PaneContainer.module.exports.PaneContainer.didAddPane (...\Atom\resources\app.asar\src\pane-container.js:306:27)
at Pane.module.exports.Pane.setContainer (...\Atom\resources\app.asar\src\pane.js:125:26)
at PaneAxis.module.exports.PaneAxis.addChild (...\Atom\resources\app.asar\src\pane-axis.js:144:13)
at PaneAxis.module.exports.PaneAxis.insertChildAfter (...\Atom\resources\app.asar\src\pane-axis.js:216:19)
at Pane.module.exports.Pane.split (...\Atom\resources\app.asar\src\pane.js:895:23)
at Pane.module.exports.Pane.splitRight (...\Atom\resources\app.asar\src\pane.js:856:19)
at atom-pane.commandRegistry.add.pane:split-right-and-copy-active-item (...\Atom\resources\app.asar\src\register-default-commands.js:247:32)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (...\Atom\resources\app.asar\src\command-registry.js:260:29)
at ...\Atom\resources\app.asar\src\command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (...\Atom\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:580:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (...\Atom\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:388:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (...\Atom\resources\app.asar\src\window-event-handler.js:98:36)
at HTMLDocument.<anonymous> (...\Atom\resources\app.asar\src\window-event-handler.js:3:61)
Yeah, this is a weird one – this seems like an error the ItemRegistry should just silently handle, instead of putting the onus on API consumers to check whether an instance already exists in the workspace. 😕 Pretty much all of Atom's view packages are prone to this, although I think at least find-and-replace has a workaround.
I can't think of a scenario where two copies of About makes any sense. I'm more worried you can do this to settings-view and end up with two copies that immediately get out of sync as you make changes.
I think it would make most sense for items to opt-in to the copy behavior if they have been written to support it correctly. I think by default we'd include our TextEditor and perhaps Image-View and Archive-View.
Activity
winstliu commentedon Jun 5, 2016
Confirmed on Windows 10 x64, Atom 1.9.0-dev-6991246.
damieng commentedon Aug 22, 2016
Am not able to reproduce on master (1.11) on Windows 10.
winstliu commentedon Aug 23, 2016
Still happens to me on 1.11.0-dev-080f1d3.
mnquintana commentedon Aug 23, 2016
Yeah, this is a weird one – this seems like an error the ItemRegistry should just silently handle, instead of putting the onus on API consumers to check whether an instance already exists in the workspace. 😕 Pretty much all of Atom's view packages are prone to this, although I think at least find-and-replace has a workaround.
damieng commentedon Aug 23, 2016
I can't think of a scenario where two copies of About makes any sense. I'm more worried you can do this to settings-view and end up with two copies that immediately get out of sync as you make changes.
I think it would make most sense for items to opt-in to the copy behavior if they have been written to support it correctly. I think by default we'd include our TextEditor and perhaps Image-View and Archive-View.
maxbrunsfeld commentedon Sep 23, 2017
Fixed via atom/tabs#522.