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: Riccardo Mottola
Subject: Re: Mac compatility problem: recent items menu
Date: Sun, 07 Dec 2014 10:13:21 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:34.0) Gecko/20100101 Firefox/34.0 SeaMonkey/2.31

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.

This document subclass is really easy... I wonder if something is missing or if subclassing certain methods causes compatibility problems.

http://svn.savannah.nongnu.org/viewvc/trunk/user-apps/Graphos/GRDocument.m?revision=1673&root=gap&view=markup

(although inside there there is some mysterious code in the windowControllerDidLoadNib which checks that the controller is the same... I don't think this affects us)

I suppose it is easier to understand Graphos first, less code. But I remain clueless.

Riccardo



reply via email to

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