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: Dr. H. Nikolaus Schaller
Subject: Re: Mac compatility problem: recent items menu
Date: Sat, 6 Dec 2014 09:02:53 +0100

Hi Riccardo,

Am 06.12.2014 um 01:04 schrieb Riccardo Mottola <riccardo.mottola@libero.it>:

> Hi,
> 
> I have this time a "reverse" problem. Both Graphos and PRICE are document 
> based application and as such have an "open recent" menu.
> 
> Now, it works fine and on Mac 10.3/10.4 and on GNUstep, but on Mac 10.6 and 
> later (Gregory tested 10.10) it doesn't. Now even if I compile in 10.4 mode 
> or take over the working binary from 10.4 on 10.6 and execute it in Rosetta, 
> it does not work.
> 
> Now, for sure here Apple is having a compatibility problem when running older 
> stuff, but that is not the point: the code should work fine in version after 
> 10.6!
> Can someone give me a clue what broke/changed? Afterwards e should then check 
> GNUstep.
> 
> I did not find anything relevant among the warnings but also not on the 
> internet when searching the matter.

I know a similar issue - running Xcode 3.2 on 10.9.5 has an empty Recent items 
menu (it did work on 10.6.8).

The Recent Items menu is almost undocumented and handled automatically inside 
of NSDocument. So if you start a DBA project from scratch you wont have to 
write any line of code or configure anything to make the recent items work.

I can think of some potential undocumented “rules” which have changed between 
Mac OS versions:

* the location of the menu items in the NSMenu
* the selector of the Recent Menu’s item (might have to be a specific one)
* the menu might have (had) to be “preinitialised” with empty entries 
* if your subclass NSDocument, there might be a fixed name for the (internal) 
method(s) that handle the recent items - so if you overwrite some public method 
it might break recent items because the NSDocument’s internal method isn’t 
called any more
* the format of storage in the NSUserDefaults

So there is some relation between the NIB template for a DBA and NSDocument. A 
NIB file just “inherited” from older development systems might be broken on 
newer ones.

I.e. you could try to rebuild the NIB file from a fresh template (to save work 
it could remain incomplete) and check if the recent items behave differently. 
If they do it is a hint where to look deeper.

Another suggestion for research is to locate the NSUserDefaults storage and 
(backup + ) delete it.

BR,
Nikolaus




reply via email to

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