|
From: | Blake Nicholson |
Subject: | Re: gnustep make and linking applications to extensions |
Date: | Tue, 17 Jun 2008 15:34:04 -0400 |
On Jun 17, 2008, at 2:35 PM, Andreas Höschler wrote:
Hi all,does anyone know a gnustep example application that builds under MacOS with gnustep make and that correctly sets up the necessary plist files (or whatever has to be done) to link file extensions to application so that a doubleclick on a document file in Finder automatically lauches the corresponding application?I have written an app that should act as an editor for *.project files. The linkage works under MacOSX 10.2 and GNUstep but not on Leopard. Any idea?I have found the following file in the application wrapper pico /Applications/InterfaceBuilder.app/Contents/Info.plist { NOTE = "Automatically generated, do not edit!"; NSExecutable = "InterfaceBuilder"; NSMainNibFile = ""; GSMainMarkupFile = ""; CFBundleIconFile = "InterfaceBuilder.icns"; NSPrincipalClass = "NSApplication"; } I modified that as follows { NOTE = "Automatically generated, do not edit!"; NSExecutable = "InterfaceBuilder"; NSMainNibFile = ""; GSMainMarkupFile = ""; CFBundleIconFile = "InterfaceBuilder.icns"; NSPrincipalClass = "NSApplication"; NSRole = "Editor"; NSTypes = ( { NSUnixExtensions = ( "smib" ); NSIcon = "nibfile.tiff"; } ); }and Finder.app immediately had the connection between smib files and InterfaceBuilder.app. Great!Not great! This worked only after manually binding this one *.smib file to /Applications/InterfaceBuilder.app using the Inspector Pane of Finder.app. Trying to set the binding for all files with this extension produced an undefined error message. I am still at the beginning. What can I do to establish this binding with gnustep make or any hacked file in the Contents folder of the application wrapper on Leopard?Is anybody (except me) actually using gnustep make on MacOSX 10.5? Hints are still very welcome!
Andreas,While I do use gnustep-make on OS X 10.5, I have not configured an application as the default for specific document types as you are trying to do. You may want to take a look at Apple's "Document-based Applications Overview: Storing Document Types Information in the Application's Property List" documentation:
http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/Concepts/DocTypePList.htmlBased on a quick glance at this document, it appears the changes you manually made to Info.plist may not have the proper keys. If you use the keys mentioned in the above document and follow Richard's suggestion of putting your customization into XXXInfo.plist (with XXX being the name of your application), hopefully things will work as you desire.
Also, Apple is moving towards the use of Uniform Type Identifiers (UTIs), instead of combinations of file extensions, type/creator codes, etc. The following document gives some brief background on UTIs.
Uniform Type Identifiers Overview http://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/index.htmlI hope something from the above gets you going in the right direction. Good luck!
Blake
[Prev in Thread] | Current Thread | [Next in Thread] |