Giter VIP home page Giter VIP logo

Comments (12)

kainjow avatar kainjow commented on July 19, 2024

@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.

percontation avatar percontation commented on July 19, 2024

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.

kainjow avatar kainjow commented on July 19, 2024

Works for me with a build from Xcode 8.1 on 10.12.1.

from hexfiend.

percontation avatar percontation commented on July 19, 2024

@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.

kainjow avatar kainjow commented on July 19, 2024

I get that dialog if I choose "Data". If I select "All Types" .dat and .bundle work.

from hexfiend.

percontation avatar percontation commented on July 19, 2024

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.

kainjow avatar kainjow commented on July 19, 2024

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.

percontation avatar percontation commented on July 19, 2024

Yes, to support Open With > Hex Fiend from the Finder context menu.

from hexfiend.

kainjow avatar kainjow commented on July 19, 2024

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.

percontation avatar percontation commented on July 19, 2024

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.

kainjow avatar kainjow commented on July 19, 2024

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.

kainjow avatar kainjow commented on July 19, 2024

8c44e6e removed the file type option altogether. Saving with .dat or .bundle works. I'm closing this again.

from hexfiend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.