Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE: Folder will not open #110

Closed
lukepistrol opened this issue Mar 19, 2022 · 3 comments · Fixed by #114
Closed

ISSUE: Folder will not open #110

lukepistrol opened this issue Mar 19, 2022 · 3 comments · Fixed by #114
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@lukepistrol
Copy link
Member

With the current main I cannot open a folder anymore. I select one but nothing happens.

Last working version after #95

2022-03-20 00:22:53.833278+0100 CodeEdit[59436:7532095] [General] readFromFileWrapper:ofType:error: must be overridden by class CodeFileDocument for your application to handle file packages.
2022-03-20 00:22:53.834714+0100 CodeEdit[59436:7532095] [General] (
	0   CoreFoundation                      0x00000001b1146b08 __exceptionPreprocess + 240
	1   libobjc.A.dylib                     0x00000001b0e91e14 objc_exception_throw + 60
	2   CoreFoundation                      0x00000001b1146954 +[NSException exceptionWithName:reason:userInfo:] + 0
	3   AppKit                              0x00000001b414f43c -[NSDocument readFromFileWrapper:ofType:error:] + 368
	4   AppKit                              0x00000001b414f260 -[NSDocument readFromURL:ofType:error:] + 576
	5   AppKit                              0x00000001b3f0d930 -[NSDocument _initWithContentsOfURL:ofType:error:] + 184
	6   AppKit                              0x00000001b3f0d804 -[NSDocument initWithContentsOfURL:ofType:error:] + 228
	7   AppKit                              0x00000001b3f72c28 -[NSDocumentController makeDocumentWithContentsOfURL:ofType:error:] + 460
	8   AppKit                              0x00000001b417f884 __97-[NSDocumentController makeDocumentWithContentsOfURL:alternateContents:ofType:completionHandler:]_block_invoke + 92
	9   AppKit                              0x00000001b417f814 -[NSDocumentController makeDocumentWithContentsOfURL:alternateContents:ofType:completionHandler:] + 188
	10  AppKit                              0x00000001b3f71f0c __80-[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:]_block_invoke + 804
	11  AppKit                              0x00000001b417e7b4 __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke_4 + 36
	12  AppKit                              0x00000001b417ea74 __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke.778 + 176
	13  AppKit                              0x00000001b417e964 __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke.774 + 308
	14  AppKit                              0x00000001b4189640 ___NSMainRunLoopPerformBlockInModes_block_invoke + 44
	15  CoreFoundation                      0x00000001b10c6460 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
	16  CoreFoundation                      0x00000001b10c62d8 __CFRunLoopDoBlocks + 412
	17  CoreFoundation                      0x00000001b10c4f58 __CFRunLoopRun + 808
	18  CoreFoundation                      0x00000001b10c4490 CFRunLoopRunSpecific + 600
	19  HIToolbox                           0x00000001b9ce4dd8 RunCurrentEventLoopInMode + 292
	20  HIToolbox                           0x00000001b9ce4a64 ReceiveNextEventCommon + 324
	21  HIToolbox                           0x00000001b9ce4908 _BlockUntilNextEventMatchingListInModeWithFilter + 72
	22  AppKit                              0x00000001b3c23bcc _DPSNextEvent + 860
	23  AppKit                              0x00000001b3c224c4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328
	24  AppKit                              0x00000001b3c14690 -[NSApplication run] + 596
	25  AppKit                              0x00000001b3be5da8 NSApplicationMain + 1132
	26  CodeEdit                            0x00000001008cde60 main + 12
	27  dyld                                0x0000000100d99088 start + 516
)
@lukepistrol lukepistrol added bug Something isn't working help wanted Extra attention is needed labels Mar 19, 2022
@lukepistrol
Copy link
Member Author

Update: Opening from recents list on welcome window works as expected. See video below:

Issue.mov

@RayZhao1998
Copy link
Collaborator

RayZhao1998 commented Mar 20, 2022

You've changed this value from public.source-code to public.item in #105. It makes folders cannot be opened.

<string>public.item</string>

@pkasila pkasila self-assigned this Mar 20, 2022
@pkasila
Copy link
Member

pkasila commented Mar 20, 2022

You've changed this value from public.source-code to public.item in #105. It makes folders cannot be opened.

<string>public.item</string>

Seems like there is a problem with the priority of Workspace folders and Source code files. So, it tries to open any public.item as CodeFile. This issue has a straightforward fix (change the priority), I'll fix it right now.

pkasila added a commit to pkasila/CodeEdit that referenced this issue Mar 20, 2022
austincondiff added a commit that referenced this issue Mar 21, 2022
* Improved overall tab style to feel more native to macOS

* Fixed lint error

* More lint error fixes

* More lint error fixes

* More liner error fixes

* Create CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Fix "Welcome to CodeEdit" Main Menu item (#106)

* Fix data format (#105)

* Allow opening of `public.item` instead of `public.source-code`

* Handle errors

* Message Preview when opening the non coding file (#102)

* Cleaned up the typography for Welcome Screen

* Added support for more code editor themes

* Revert "Added support for more code editor themes"

This reverts commit 8139217.

* Revert "Cleaned up the typography for Welcome Screen"

This reverts commit 78b748b.

* Update the error message to be more informative when trying to open files that are not code related

* Added language translations for editor error and support for the Afrikaans Language

* Fixed localization changes in Russian and Belarusian

* Updated the editor error string to be short and sweet

* Update to editor error for file types.

* Change document types priority, prioritize workspace over source code file to fix #110

* Fix multiple welcome window

* Fix version localization key (#120)

* Improved overall tab style to feel more native to macOS

* Fixed lint error

* More lint error fixes

* Replicating aesthetic and behavior of standard tabs. Removed wrapper component so that code is more straightforward.

* Update WorkspaceCodeFileView.swift

Resolved conflicts

* Fixed lint errors and animations

* Added PressActionsModifier file to project

* Added PressActionsModifier.swift

* Fixed lint error

* Fixed lint error

Co-authored-by: Luke <lukas@pistrol.com>
Co-authored-by: Pavel Kasila <pavel.kasila@gmail.com>
Co-authored-by: Nanashi Li <tihan-nico@plexus.dev>
Co-authored-by: Ziyuan Zhao <ninjiacoder@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: 🏁 Complete
Development

Successfully merging a pull request may close this issue.

3 participants