Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
>Come to think of it, it's strange that you get an icon for a non- > existent file, but if it *does* exist, I'd always expect some sort of > icon. I've never run into this situation personally. Which specific > method are you using? There are: > > ­ iconForFile: > ­ iconForFileType: > ­ iconFo

Re: Programmatically Change Icon

2009-03-22 Thread I. Savant
On Mar 22, 2009, at 6:29 PM, Pierce Freeman wrote: 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 pag

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
>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/document

Re: Programmatically Change Icon

2009-03-22 Thread I. Savant
On Mar 22, 2009, at 6:09 PM, Pierce Freeman wrote: Slightly-challenging-answer: Try it and see. Non-smarmy-answer: Yes. So would the other, more complicated approach. Just tried it, and it works great... Thanks! Just two questions so far: 1. How can I get different sizes of the icon,

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
>Slightly-challenging-answer: Try it and see. > >Non-smarmy-answer: Yes. So would the other, more complicated > approach. Just tried it, and it works great... Thanks! Just two questions so far: 1. How can I get different sizes of the icon, or are they just linked to the size of the outl

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
>Slightly-challenging-answer: Try it and see. > >Non-smarmy-answer: Yes. So would the other, more complicated > approach. Lol, just wanted to make sure. >I would assume this as well ... there'd be a number of software > companies in hot water otherwise. Especially OS vendors like App

Re: Programmatically Change Icon

2009-03-22 Thread I. Savant
On Mar 22, 2009, at 5:29 PM, Pierce Freeman wrote: Would NSWorkspace also work if the app was not running, or only if it is? Slightly-challenging-answer: Try it and see. Non-smarmy-answer: Yes. So would the other, more complicated approach. While it doesn't have to do with me, it'

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
>Heh - "... some way to change another applications icon ..." > Changing has all those issues attached. Viewing on the other hand is > easy. My point exactly. ;) >As Uli mentioned, NSWorkspace should be all you need simply to get > a copy of the icon. The bundle stuff is only necessary if

Re: Programmatically Change Icon

2009-03-22 Thread I. Savant
On Mar 22, 2009, at 3:45 PM, Pierce Freeman wrote: Well, that's what I get for typing this when I was still half asleep. I meant to simply view instead of changing the icon. Heh - "... some way to change another applications icon ..." Changing has all those issues attached. Viewing on

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
Well, that's what I get for typing this when I was still half asleep. I meant to simply view instead of changing the icon. Would there be any problems (legally or otherwise) with doing this? You seem to know about these issues a lot better them myself... I definitely agree with all the problems

Re: Programmatically Change Icon

2009-03-22 Thread Uli Kusterer
On 22.03.2009, at 17:27, Pierce Freeman wrote: The problem that I see if that every application's icon name is different and I haven't found a way to read that application's icon location or will just return a NSImage that is the icon. Sure you can retrieve NSImages for application icons.

Re: Programmatically Change Icon

2009-03-22 Thread I. Savant
On Mar 22, 2009, at 12:27 PM, Pierce Freeman wrote: I am wondering if there is some way to change another applications icon programmatically. The problem that I see if that every application's icon name is different and I haven't found a way to read that application's icon location or wil

Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
Hi everyone: I am wondering if there is some way to change another applications icon programmatically. The problem that I see if that every application's icon name is different and I haven't found a way to read that application's icon location or will just return a NSImage that is the icon. Tha