John hi On 30 May 2010, at 19:47, John Joyce wrote: > That's not how these constants work. > These are intended to be constants that return the correct type for the > current build of the system. > This protects your software from a change in the actual UTI of a common type. >
I can understand the use of constants to such a purpose. Hence for instance my ability to write a file as NSRTFTextDocumentType when in the Save panel I have opted to save it as com.apple.rtfd or as a document having no UTI at all. If I read a document for which I have declared no UTI then the ofType parameter in the readFromData:ofType:error: displays the Name I have used to describe that document type. On the other hand if I have used a UTI then it is the UTI that is passed as the ofType parameter. So if I have this correctly, in the case of files that will only ever be read by my application it really does not matter what extension or UTI I give them since it is the responsibility of my code to make sense of them. However, if I want to write files that other applications can read I have not only to provide the correct format but also the correct extension or UTI . Is it therefore the case that when writing files to be read by other applications I need not only write using the correct NSDocumentTypeDocumentAttribute but also provide the correct UTI (or extension)? If so then surely I need to have an idea of which UTI's (if any) go with a given NSDocumentTypeDocumentAttribute? Thanks Julius http://juliuspaintings.co.uk _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com