discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connecting file extensions to applications


From: Richard Frith-Macdonald
Subject: Re: Connecting file extensions to applications
Date: Wed, 13 Sep 2006 17:16:35 +0100


On 13 Sep 2006, at 17:09, Andreas Höschler wrote:

Hello Richard,


how can I make my app to start automatically and open a document file when I doubleclick on a file with a specific extension, e.g. *.project? I have a file CustomInfo.plist in the project directory and listed all document types.

It should be as simple as installing the app in one of the standard locations, then running make_services. I would assume GWorkspace honors the standard mechanism ... but just in case, you could try using gopen to open the file without having GWorkspace running/available.

NSWorkspace is supposed to setup a dictionary extPreferences in +initialize. This is done by reading the file .GNUstepExtPrefs. However, this file does not exist (is not created by make_services)!?

How is this supposed to work?

That dictionary is supposed to be used to specify user preferences for which application to use in the case that more than one application can handle the same type of document. It should be irrelevant if you haven't set up any preferences.

However, it occurs to me that, if you set up a preference to use one app, then deleted that app from the system, the code might try to continue using that app even though it no longer exists ... that might be worth looking in to.

That's not the case. The preferred dic is nil. I have file Info- gnustep.plist in my project dir that contains an entry

     {
        NSName = "project";
        NSHumanReadableName = "project File";
        NSUnixExtensions = ("project");
        NSDOSExtensions = ("project");
        NSRole = Editor;
        NSIcon = "projfile.tiff";
      }

After "make install" I checked this file in /opt/GNUstep/System/ Application/.. . and this file does not contains this entry, which explains why make_services can't know about it. Instead this file contains an entry

  NOTE = "Automatically generated, do not edit!";

Who the heck is generating this file based on what data? What am I missing?

Ah ... that's the make system ... it builds Info-gnustep.plist from xxxInfo.plist where xxx is the name of the application. There's some documentation about the info.plist stuff in the application.make






reply via email to

[Prev in Thread] Current Thread [Next in Thread]