[Openmcl-devel] Creating extensions associations for my application

R. Matthew Emerson rme at clozure.com
Thu Jan 13 00:14:29 UTC 2011


On Jan 12, 2011, at 5:46 PM, Michael Minerva wrote:

> I would like to create file extension associations for my application and I am having trouble figuring out how to do this with build build-application.  It seems that the cocoa way to do this would be to add a CFBundleDocumentTypes key to the info.plist of my application.  When I tried to do this using build-application the first thing I noticed is that make-info-dict (which seems to be the standard way to create a plist by way of of build-application's info-plist key) does not accept a key for CFBundleDocumentTypes key, also it seems that there is no way to specify an actual info.plist file for build-application to use, instead it seems that you must specify an NSDictionary to be used to create the plist from (am I mistaken)?  If all of this is correct, how would one specify file extension associations and icons to use with those files through ccl?  Thanks a lot.

There's nothing magic about the keys supported by make-info-dict.  You can always add more yourself.

(setq dict (#/mutableCopy info-plist)) ;if needed
(#/setValue:forKey: dict my-document-types #@"CFBundleDocumentTypes)

In this, my-document-types is an NSArray of type information.

You can look at ccl:cocoa-ide;Info.plist-proto for an example of some document type specifications.

See also:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Documents/Concepts/DocTypePList.html%23//apple_ref/doc/uid/20000024-BHADAGHF


More information about the Openmcl-devel mailing list