discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Mac compatility problem: recent items menu


From: Wolfgang Lux
Subject: Re: Mac compatility problem: recent items menu
Date: Sun, 7 Dec 2014 11:01:23 +0100

Am 07.12.2014 um 10:13 schrieb Riccardo Mottola <riccardo.mottola@libero.it>:
> 
> Hi,
> 
> Wolfgang Lux wrote:
>> The recent documents menu is updated by the NSDocumentController method 
>> -noteNewRecentDocumentURL:. This method, in turn, is called from 
>> NSDocumentController -noteNewRecentDocument:, which is called automatically 
>> by NSDocumentController methods when you open a document and by NSDocument 
>> methods when you save a document, so it is a bit surprising if this does not 
>> work for you. Perhaps you are using some deprecated document and document 
>> controller methods (the file based ones instead of the URL based ones) or 
>> you have implemented your overrides in such a way that the 
>> -noteNewRecentDocument: method gets no longer called on (not so) recent OS X 
>> versions.
> it is very surprising to me too.
> 
> First, I followed Nikolaus' suggestions and deleted the app defaults. But in 
> any case, there were no noted recent files inside. It did not help. In the 
> case of PRICE, which has some NIBs that were first created 12+ years ago, I 
> also tried making a new, minimal NIB (XIB actually), but still the recent 
> menu is not updated. Neither on Open nor on Save.
> 
> In the case of PRICE, I do not even subclass NSDocumentController. Only the 
> NSWindowController
> 
> http://price.cvs.sourceforge.net/viewvc/price/PRICE-osx/MyDocument.m?revision=1.93&view=markup
> 
> You can see that I subclass directly the loadDataRepresentation method, so I 
> think most of the housekeeping jobs should be done by the controller, of 
> which I use the standard one?
> 
> In Graphos (you can find it in user-apps in GAP) I do not subclass 
> NSDocumentController neither the NSWindowController, so the application is 
> really quite standard.
> Here too, I just subclass loadDataRepresentation.

Well, in that case the problem perhaps simply could be in the Info.plist file. 
I see that you are using the traditional CFBundleTypeExtensions and 
CFBundleTypeOSTypes keys to declare your document types. However, Apple has 
switched to using Universal Type Identifiers (UTIs) quite a while ago. AFAIR, 
if the NSDocument framework does not find UTIs in the Info.plist file but only 
the old keys, it calls some of the deprecated document controller methods 
itself and that may or may not work (I can't really tell because I added UTIs 
to all my document based applications long ago). I think you should try adding 
UTIs for document your types to PRICE.

Wolfgang


reply via email to

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