[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 15:07: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 |
Hallo Wolfang,
Wolfgang Lux wrote:
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.
thanks for the hints.
I added UTIs (for PRICE it is easy, they are all public), it did not
help, but I commitd the change anyway, it can't hurt. For Graphos I'll
need to define my own, that later, when we understand what's going on.
Just adding one makes the app not recognize its own docs anymore.
I put two breakpoints, in noteNewRecentDocumentURL: and
noteNewRecentDocument:
I get first into the latter, then into the first, with this trace:
(gdb) bt
#0 0x920b4fd1 in -[NSDocumentController noteNewRecentDocumentURL:] ()
#1 0x91f9c4b3 in -[NSDocumentController
_finishOpeningDocument:andShowWindows:] ()
#2 0x91f9b672 in -[NSDocumentController
openDocumentWithContentsOfURL:display:error:] ()
#3 0x91f9a858 in -[NSDocumentController
_openDocumentsWithContentsOfURLs:display:presentErrors:] ()
#4 0x920b5dcb in -[NSDocumentController openDocument:] ()
#5 0x91d8ea26 in -[NSApplication sendAction:to:from:] ()
#6 0x91d8e8d9 in -[NSMenuItem _corePerformAction] ()
#7 0x91d8e5ca in -[NSCarbonMenuImpl
performActionWithHighlightingForItemAtIndex:] ()
#8 0x91d8e4b6 in -[NSMenu performActionForItemAtIndex:] ()
#9 0x91d8e469 in -[NSMenu _internalPerformActionForItemAtIndex:] ()
#10 0x91d8e3cf in -[NSMenuItem
_internalPerformActionThroughMenuIfPossible] ()
#11 0x91d8e313 in -[NSCarbonMenuImpl
_carbonCommandProcessEvent:handlerCallRef:] ()
#12 0x91d82a55 in NSSLMMenuEventHandler ()
There is no single line of code of PRICE in this trace! Is there a way
to print out the URL? The document? IN the debugger I get only assembler.
It proves though that the methods do get called, that's something already.
I tried under Graphos, and the method gets called there too!
I even tried removing the recent menu items menu, since it gets
auto-inserted! Nothing :(
Riccardo