On Aug 28, 2008, at 2:15 AM, Gerriet M. Denkmann wrote:
// this always works, regardless of name:
- (IBAction)ImageNameD: sender;
{
NSBundle *mainBundle = [ NSBundle mainBundle ];
NSDictionary *infoDictionary = [ mainBundle infoDictionary ];
NSString *iconFile = [ infoDictionary objectForKey:
@"CFBundleIconFile" ];
NSImage *image = [ NSImage imageNamed: iconFile ];
[ imageView setImage: image ];
}
You can make that shorter, by removing the infoDictionary ivar and
changing the iconFile one to [mainBundle
objectForInfoDictionaryKey:@"CFBundleIconFile"].
Could someone please show me, where the valid values for
CFBundleIconFile are documented?
Tiger 10.4.11.
Property List Key Reference:
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html#//apple_ref/doc/uid/20001431-BCIJIJBH
>
--------------------------------------
Darkshadow
(aka Michael Nickerson)
http://www.nightproductions.net
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]