The Leopard release notes about UTIs keep confusing me immensely. IMHO they are either wrong, or the implementation is buggy.
There is a -[NSDocument fileNameExtensionsForType:saveOperation:] replacing [NSDocumentController fileExtensionForType:]. However it is said to be only called from autosave and applescript save. So how is the file extension for saving (exporting) actually determined? They say it is determined by the save panel, but the save panel has no information about this AFAICS. In Tiger fileExtensionForType: *is* used for this, so what happens in Leopard? If we ever want to support UTIs in Leopard this is crucial for custom templates. -[NSDocumentController documentClassForType:] returns the first document class that has a readable UTI to which the passed in type conforms (for UTIs). That sounds pretty buggy to me. If I have, say, a document class handling kUTTypeText, and another one handling a custom type that conforms to kUTTypeText, then according to this rule *both* document classes could read the custom type. So this methods returns either one of the document classes, and in fact an arbitrary one. That is obviously wrong, as it should return the class that can handle the custom type. Is it really this buggy, or are the releae notes wrong? Another thing, what to do with known types (e.g. having a MIME type) for which there isn't a UTI? As Leopard wants all or nothing (all have a UTI or none have a UTI) it gives a big problem. You can choose some custom UTI, but then two apps declaring this type will give conflicts (in particular because NSDocumentController now uses the shared NSWorkSpace to interpret UTIs from URLs, rather than keeping it within the app). On the other hand, not using a UTI is not allowed when you want to use UTIs for other types. It seems to me, looking at the release notes, that it is impossible to handle custom template types using UTIs in Leopard. Christiaan ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop