discuss-gnustep
[Top][All Lists]
Advanced

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

NSWorkspace openFile: does not work


From: Andreas Höschler
Subject: NSWorkspace openFile: does not work
Date: Wed, 13 May 2020 00:19:12 +0200

Hi all,

sorry for bothering you guys again. I am still not yet through with setting up a productive work environment.

When I double-click in some Finder like app on a file name - e.g. Test.gorm - I programmatically do

      [[NSWorkspace sharedWorkspace] openFile:path];

and would like to see Gorm.app open automatically and see it loading the file given by path (e.g. Test.gorm). Instead Test.gorm is opened on a Terminal window which is a little surprising to me!? 

I unfortunately do not remember (from using GNUstep years ago) the exact mechanism of giving NSWorkspace the 

pathExtension -> responsible application

info. From checking out Gorm.app/Resources I conclude that the Resources folder of an app needs to announce which kinds of files it can handle in some Info-gnustep.plist file which actually is a propertyList with an NSTypes = (...) entry!?

But how and when and by whom are all the installed applications Resources folders (the NSTypes entries) scanned to build a map so that NSWorkspace knows what to do with a 

      [[NSWorkspace sharedWorkspace] openFile:path];

call? Is this map automatically created by NSWorkspace whenever sharedWorkspace is initiated? If so why does it not work for me (file contents shown in a terminal session)? Or do I need to build this map by calling some GNUstep utility manually after installing a new app?



Thanks a lot again,

Andreas



reply via email to

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