Comments (12)
@percontation looks like this from 78acc50 - why are specific file types listed in the plist? Why leave it as it was and allow all file types?
from hexfiend.
Without specific UTIs, HexFiend doesn't appear in Finder's "Open With..." menu. (For a given file, Finder only shows an app in the "Open With..." menu if it matches an explicit UTI). I added the most common UTI superclasses so HexFiend would be an option many files' "Open With..." options.
I bet this bug came up due to a combination of new OS X 10.10 saving behavior, and the fact that on my system VLC has assigned some weird UTI to .dat files.
from hexfiend.
Works for me with a build from Xcode 8.1 on 10.12.1.
from hexfiend.
@kainjow: What about if you try saving with a name like test.bundle
? The problem is with extensions that are bound to a UTI that does not inherit from one listed in the CFBundleDocumentTypes. I still see this issue on 10.11.
from hexfiend.
I get that dialog if I choose "Data". If I select "All Types" .dat and .bundle work.
from hexfiend.
Ah, yeah. I guess we should find a way to kill that section of the dialog (and always do whatever All Types is doing).
from hexfiend.
Apparently NSSavePanel has allowsOtherFileTypes. in BaseDataDocument's prepareSavePanel: I set that to YES, and it allowed saving as .jpg when Data was selected.
So then do we need the Other and Data document types in Info.plist?
from hexfiend.
Yes, to support Open With > Hex Fiend from the Finder context menu.
from hexfiend.
allowsOtherFileTypes still requires using allowedFileTypes to set which other file types are allowed, so even with that set it still warns about .bundle when Data is selected, but if I set allowedFileTypes to kUTTypeBundle then it works. So technically if we got all known UTIs we could manually list them, but that seems clunky.
from hexfiend.
Hmm, does adding
savePanel.allowedFileTypes = nil;
savePanel.allowsOtherFileTypes = YES;
to that prepareSavePanel method at least partially fix this for you? I can still manage pop the "(null)" dialog though some combination of first saving as "Other" and then trying to Save As "Data"... but at least the case of wanting to save a new document with a weird extension seems to work with those properties set.
from hexfiend.
Actually I'm not sure allowsOtherFileTypes actually made any difference, now that I'm trying to test again without it and can still save with .jpg. I cannot either way save with .bundle unless I use AllTypes.
Since this is an OS X bug and using AllTypes solves the problem, maybe we shouldn't worry too much about workarounds?
The use of CFBundleTypeOSTypes is deprecated as of 10.5 anyways, so it's bound to stop working at some point.
from hexfiend.
8c44e6e removed the file type option altogether. Saving with .dat or .bundle works. I'm closing this again.
from hexfiend.
Related Issues (20)
- When the text encoding is changed from the menu, the application crashes. HOT 2
- Compare window is a document window that can be saved
- Ability to transform template type values HOT 2
- [2.18] Byte grouping of 2 or 3 causes Compare window to be invisible
- Preferences window should be titled Settings on Ventura+
- Change settings window to a toolbar
- [2.18] Compare scroller overlaps plain text view
- [2.18] Columns not working correctly on left side for Compare
- Text Encoding and Byte Grouping cause Compare window to shrink
- [2.18] Byte Theme doesn't apply to left side for Compare
- [2.18] Bookmarks don't apply to left side for Compare HOT 1
- Adding a Bookmark marks the window as dirty, prompting to save on close
- Support applying highlight colors from templates HOT 2
- Replace deprecated SMJobBless with SMAppService in privilege helper
- Replace Mach messaging/MIG with XPC in privileged helper
- Replace distributed notifications with CFMessagePort in hexf
- Setting HFTextView.data to empty doesn't update the view. HOT 1
- Adding custom encoding HOT 1
- Variable to get how many sections deep the template is currently
- Question about "open with" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexfiend.