Discussion:
[Skim-app-develop] UTI for dvi
Christiaan Hofman
2012-10-16 10:27:29 UTC
Permalink
Adam, has there ever been a consensus reached on UTIs for tex related types such as dvi? Should it be org.tug.tex? Could it now work as a document type?

Christiaan
Adam R. Maxwell
2012-10-16 14:26:24 UTC
Permalink
Post by Christiaan Hofman
Adam, has there ever been a consensus reached on UTIs for tex related types such as dvi? Should it be org.tug.tex? Could it now work as a document type?
Depends on what you mean by consensus. My white paper is here:

https://code.google.com/p/mactlmgr/source/browse/#svn%2Fmactex_uti

Jerome Laurens suggested some changes on the mactex list, and TUG didn't have a problem with using org.tug as the base. I guess I could publish it in TUGboat or ask for feedback on comp.text.tex. Now that iPad applications are proliferating, it might be too late...

I think TeXShop is currently having issues with partial adoption of UTI, similar to what we had in BibDesk.

adam
Christiaan Hofman
2012-10-16 15:10:24 UTC
Permalink
Post by Adam R. Maxwell
Post by Christiaan Hofman
Adam, has there ever been a consensus reached on UTIs for tex related types such as dvi? Should it be org.tug.tex? Could it now work as a document type?
https://code.google.com/p/mactlmgr/source/browse/#svn%2Fmactex_uti
Jerome Laurens suggested some changes on the mactex list, and TUG didn't have a problem with using org.tug as the base. I guess I could publish it in TUGboat or ask for feedback on comp.text.tex. Now that iPad applications are proliferating, it might be too late...
I think TeXShop is currently having issues with partial adoption of UTI, similar to what we had in BibDesk.
adam
Do you remember what issues there were with mixing UTI and non-UTI document types? It seems TeXShop is really making a mess of it, as they also use the same UTI for different document types. AFAIK that is not supported because the UTI is used as the document types, so I don't even see how that could work.

Christiaan
Adam R. Maxwell
2012-10-16 16:11:30 UTC
Permalink
On Oct 16, 2012, at 08:10 AM, Christiaan Hofman <***@gmail.com> wrote:

Do you remember what issues there were with mixing UTI and non-UTI document types?
 
Does this ring any bells?  

http://www.omnigroup.com/mailman/archive/macosx-dev/2007-November/060638.html

I think there were problems with the export-only file types, among other things, like calling a .tgz file something other than what the OS calls it?

It seems TeXShop is really making a mess of it, as they also use the same UTI for different document types. AFAIK that is not supported because the UTI is used as the document types, so I don't even see how that could work.
 
I haven't looked for a while, but if that's the case, things will certainly go badly.  Keeping deprecated load/save methods will also cause problems, so UTI is really all-or-nothing, and when you accept it, you have to go with its limitations (of course!).

I also wrote up some stuff on conflicts and tried to make that document useful for developers without ranting too much about Apple's design decisions.  However, if you have more than one UTI for a given tag (i.e., extension), Launch Services wets itself, and Apple really doesn't care.

Adam
Christiaan Hofman
2012-10-16 17:29:20 UTC
Permalink
Post by Adam R. Maxwell
Post by Christiaan Hofman
Do you remember what issues there were with mixing UTI and non-UTI document types?
Does this ring any bells?
http://www.omnigroup.com/mailman/archive/macosx-dev/2007-November/060638.html
I don't remember though why I said it's all or nothing. I seem to remember that some things did not work properly when mixing UTI and non UTI types, but can't find back what went wrong, and also cannot reproduce. Perhaps it was that NSExportableAs did not support mixed types, but that does seem to work in 10.6.

A simple test project with mixed types seems to work properly, but that only uses custom extensions and types.
Post by Adam R. Maxwell
I think there were problems with the export-only file types, among other things, like calling a .tgz file something other than what the OS calls it?
On 10.6 now, at least in a test project I can save with a custom type that declares a known file extension like .txt. Not sure what it does with the system though. Perhaps if they're imported UTIs they should always be ignored in favor of the system defined ones.
Post by Adam R. Maxwell
Post by Christiaan Hofman
It seems TeXShop is really making a mess of it, as they also use the same UTI for different document types. AFAIK that is not supported because the UTI is used as the document types, so I don't even see how that could work.
I haven't looked for a while, but if that's the case, things will certainly go badly. Keeping deprecated load/save methods will also cause problems, so UTI is really all-or-nothing, and when you accept it, you have to go with its limitations (of course!).
I also wrote up some stuff on conflicts and tried to make that document useful for developers without ranting too much about Apple's design decisions. However, if you have more than one UTI for a given tag (i.e., extension), Launch Services wets itself, and Apple really doesn't care.
Adam
The reason I am again looking at it is that I finally figured out a way to create UTIs for dynamically defined document types, such that the system knows what file extension is associated to it, which is the most important property for NSDocument to be able to deal with it for saving.

Christiaan
Christiaan Hofman
2012-10-20 13:53:08 UTC
Permalink
BTW, I saw you made a mistake in the declaration in your DVI importer and generator. The com.apple.ostype should be inside the UTTypeTagSpecification dict. Not that it matters, because it's an obsolete parameter.

And where did you get the "DDVI" OS type from? I saw "*DVI" somewhere else.

Christiaan
Adam R. Maxwell
2012-10-20 15:25:27 UTC
Permalink
Post by Christiaan Hofman
BTW, I saw you made a mistake in the declaration in your DVI importer and generator. The com.apple.ostype should be inside the UTTypeTagSpecification dict. Not that it matters, because it's an obsolete parameter.
Thanks, fixed that (and you're right, it's ignored by Launch Services in 10.6 and later). I think mime-type is unused by LS as well.
Post by Christiaan Hofman
And where did you get the "DDVI" OS type from? I saw "*DVI" somewhere else.
I do not recall. It may have been from MacDVIX or OzTeX. Some of the others came from a TeXtures user.

-- adam

Loading...