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: Fri, 02 Jan 2015 16:19:05 +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:
 From a quick glance at PRICE's svn repository, I'd say that the problem is the 
checks for your document types in MyDocument -dataRepresentationOfType:. When 
UTIs are defined for your document types, OS X Leopard and later pass the UTI 
instead of the document type name to methods -dataRepresentationOfType: and 
-loadDataRepresentation:ofType:. So, in dataRepresentationOfType: you should 
change the check
   if ([aType isEqualToString:@"TIFF"])
into
   if ([aType isEqualToString:@"TIFF"] || [aType 
isEqualToString:@"public.tiff"])
and similarly for the JPEG case.
I think you are right.
Documentation says:

aType is the type name corresponding to the value of the CFBundleTypeName entry in the document type's Info.plist dictionary.

Given the entry:
            <key>CFBundleTypeName</key>
            <string>TIFF</string>


It should still be TIFF!

However, this method is deprecated and called by dataOfType:error: for which the documentation just says
typeName: The string that identifies the document type.


Which is much more generic! But thanks to your hint I put a breakpoint and I see "public.tiff" or "public.jpeg"

So, Wolfgang is better than Apple's doc which is "unclear" to say the best!

Fix committed, it works! Thanks!

Riccardo

PS: how is UTI support in GNUstep perhaps it would make sense to add it? Or is it already there and ProjectCenter is obsolete and doesn't support it? In case I shall update it.








reply via email to

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