I’m trying out my document-based Mac app’s data-read routine, and the code it 
being skipped. I actually check the typeName (i.e. the UTI) and it doesn’t 
match. My bundle identifier for the app has capital letters. I base my 
document’s main type off that identifier, so it also has capital letters. Turns 
out that the system gives me the UTI in all small letters, so my (Swift) 
“switch” fails and my no-matching-type code is executed. I know I could switch 
my bundle ID to all small letters, but I want to know first if this is 
documented? Or is the small-letters transformation a bug?

BTW, I looked at the TextEdit sample code, and it uses the type conformance 
methods instead of an exact string match. Should I be doing that instead? 
(Although that means no more “switch” statement.)

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to