On Wed, 26 Apr 2000 19:48:05 +0300 (EEST), [EMAIL PROTECTED] wrote:
> I'm trying to set some preferences in .GNUstepExtPrefs using NSWorkspace's
> -setBestApp:inRole:forExtension:
> I think that, near the end of the method, there is an error.
> In these lines:
>
> [map setObject: inf forKey: ext];
> RELEASE(inf);
> RELEASE(extPreferences);
> extPreferences = inf;
> data = [NSSerializer serializePropertyList: extPreferences];
> [data writeToFile: extPrefPath atomically: YES];
>
> I think that
>
> "extPreferences = inf;"
> must be
> "extPreferences = map";
>
> else the path extension is not included in the dictionary.
I think you are correct - I have included this fix in the CVS repository.
> Tried to correct and recompiled, I can see all the information in the
> dictionary "{gdr = {Editor = nedit.app; }; }", for example, but
> NSWorkspace doesn't open a file ".gdr" with the new app.
The only thing that occurs to me is that the info.plist of nedit.app must say
that it is prepared to open .gdr files - if the app doesn't declare that if
can open the file type then it won't be asked to open it irrespective of
preferences.
If this isn't your problem, the only thing I can suggest to do is to step
through in gdb and see exactly what is happening.