Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does the Workspace not like Germans?



On 2005-10-17 21:54, Gerriet M. Denkmann said:

>I have an application which has an icon called Maß.icns .
>(In case someone has messed up this name: the last character is a
>"Latin Small Letter S")
>
>NSImage *i1_ok = [ NSApp applicationIconImage ];
>NSImage *i2_ok = [ NSImage imageNamed: @"NSApplicationIcon" ];
>NSImage *i3_bad = [[NSWorkspace sharedWorkspace] iconForFile:[[NSBundle
>mainBundle] bundlePath]];

bundlePath "returns the full pathname of the receiver's bundle
directory", so you're not really asking it to open the icon file, but
rather to get the icon of your app bundle.  You need something like:

[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Ma
\U00DF.icns"]

if you really want to use NSWorkspace. Remember, you can't put non-ASCII
chars in @"" (how pathetic).

But I think NSBundle's pathForResource:ofType: is nicer.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Why does the Workspace not like Germans? (From: "Gerriet M. Denkmann" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.