Re: Programmatically Change Icon
Re: Programmatically Change Icon
- Subject: Re: Programmatically Change Icon
- From: Pierce Freeman <email@hidden>
- Date: Sun, 22 Mar 2009 15:29:27 -0700
- Thread-topic: Programmatically Change Icon
> I suggest some reading:
>
> http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classe
> s/nsimage_Class/Reference/Reference.html
>
> http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Im
> ages/Images.html
>
> http://developer.apple.com/documentation/Cocoa/Conceptual/ImageView/ImageView.
> html
Thanks for the links, I'll look them over when I get a chance.
> This is what I'd expect ... if an application has no custom icon,
> it gets the standard, generic application icon. In this case, you'd
> probably want to go with the "get the app icon file name, then ask the
> app bundle for the resource of that name" route. This way, if there's
> nothing set for the app icon key, you'll know there's no custom icon.
> If so, you can just use the NSWorkspace call to get that custom icon.
I think I may just go this route, especially if it doesn't break any
copyright/patent/etc. Laws. ;) But the odd thing is, if I set the path to a
file that I know doesn't exist (ex.
/Applications/soidaoidaiodsaoidiasoadsoidoiaadiosoaidiodaoidasoidaoidasoiado
iasdoidaoidadasoidiaosasidoosdiaiodsiodsa.app) it will still return some
weird page icon.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden