Re: How to obtain icon displayed by Finder for a file
Re: How to obtain icon displayed by Finder for a file
- Subject: Re: How to obtain icon displayed by Finder for a file
- From: "Kyle Sluder" <email@hidden>
- Date: Thu, 8 Jan 2009 00:16:27 -0500
On Wed, Jan 7, 2009 at 11:51 PM, David <email@hidden> wrote:
> Amazingly difficult, but I have it working almost 2 different ways. I
> created my own ImageAndTextCell class and handle my own drawing based on
> some code from Dave Blanton.
> I've also tried the NSAttributedString since that sounded potentially
> cleaner, more powerful and generally useful.
I'd disagree. I'd say that the proper way to do this is to implement
a custom NSCell subclass (a la ImageAndTextCell). This is more in
line with the framework: the cell is given an object value, which the
cell represents by drawing into a view. That object value happens to
have two valid representations: an image and a textual label.
Therefore the cell should draw those two representations.
--Kyle Sluder
_______________________________________________
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