Re: Using icns for toolbar icons?
Re: Using icns for toolbar icons?
- Subject: Re: Using icns for toolbar icons?
- From: Marco Binder <email@hidden>
- Date: Tue, 10 Jun 2003 14:30:19 +0200
Actually, a toolbar accepst an NSImage. And NSImage is NSImage, no
matter what format the original data was. If the image can be
initialized, you can use it as u wish, including as a toolbar item4s
icon. And NSImage should suport .icns files (as NSImageRep
imageFileFormates reveals). So I d say, everything is fine. It should,
IMHO, boil down to the way you access the image. try using [[NSImage
alloc] initWithContentsOfFile:[[NSBundle mainBundle]
pathForImageresource:@"Movie.icns"]]; (typed in Mail.app)
Marco
Am Montag, 09.06.03, um 19:32 Uhr (Europe/Berlin) schrieb Colin Cornaby:
Hi,
I currently have code like this in order to set the icon of a toolbar:
[toolbarItem setImage: [NSImage imageNamed: @"Movies"]];
This works fine with tiffs. However, this does not work with icns
files. I don't know if the problem lies in the imageNamed function, or
if toolbars simply cannot handle icns icons. Any pointers, or should I
just convert to tiff?
------------
Colin Cornaby
Head Person - Conundrum Software - http://www.conundrumsoft.com
Duality 4 GT - Now available only for Mac OS X Jaguar.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
|\ /| email@hidden
http://www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.