Le 28 août 08 à 08:15, Gerriet M. Denkmann a écrit :


// this shows the application default icon if CFBundleIconFile = "heiß"
//      works ok for CFBundleIconFile = "hot"

- (IBAction)iconForFileN: sender;
{
        NSBundle *mainBundle = [ NSBundle mainBundle ];
        NSString *bundlePath = [ mainBundle bundlePath ];
NSImage *image = [ [ NSWorkspace sharedWorkspace ] iconForFile: bundlePath ];
        [ imageView setImage: image ];
}


//      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 ];
}

Could someone please show me, where the valid values for CFBundleIconFile are documented?
Tiger 10.4.11.

Guessing around (name must be American?), (must NOT be German?), (may contain only three characters?), (only one vowel allowed?) is not really satisfying.


Kind regards,

Gerriet.

What does -[NSApp applicationIconImage] return ?


_______________________________________________

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]

Reply via email to