Getting folder icon image
Getting folder icon image
- Subject: Getting folder icon image
- From: fritx <email@hidden>
- Date: Tue, 2 Jul 2002 17:53:11 +0100
Hello, everyone
Sorry if this has been covered before, I am new to Cocoa. Can't find
anything in the doc.s and even google has failed me.
I'm writing a little 'file browser' app that uses an NSOutlineView to
show the file heirarchy to the user. I wanted to add an appropriate icon
for the files in each cell as well and found that NSWorkspace seemed to
have exactly what I wanted:
NSImage *fileImage = [[NSWorkspace sharedWorkspace]
iconForFileType:[myFile extension]];
(Where [myFile extension] returns, for example @"tiff").
This works well but my problem is I can't find a way to get the image
for file elements that have no extension (such as folders). Any ideas?
Cheers
Richard
_______________________________________________
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.