I must complain again. Cocoa does not have a clean well designed object
model. It seems haphazard. Someone needed a function here, but not there.
Apple doesn't go back and look at making general purpose classes and
methods.
Some of the cell classes seem very specialized. I had assumed that
NSTextFieldCell could display an icon. Frequently there are outline views of
files which display icons and names, yet there is no simple class which
implements this functionality. Instead everyone needs to write their own
with inconsistent behavior.

I've been able to get NSBrowserCell to work somewhat by setting
setLeaf:TRUE. However, now I get the icon smashed up right next to the
disclosure triangle. There again, there are no basic controls to add some
spacing. Argh.

Thanks for the responses. I guess I'll have to bail on the NSBrowserCell and
write my own NSCell subclass unless I can come up with a way to add some
spacing.

On Wed, Jan 7, 2009 at 6:03 PM, Rob Rix <rix....@gmail.com> wrote:

> Either make your own cell class, or use two columns for that. I'd recommend
> the latter due to simplicity, but it may not give you the look you're going
> for.
>
> Sincerely,
> Rob
>
>
> On 7-Jan-09, at 5:36 PM, David wrote:
>
>  Great! Thanks for the info. I hoped it was something simple.
>> Next question though... how do I set the icon (image) for a 1st column of
>> an
>> outline view and have it show text as well?
>>
>> I found an example using NSBrowserCell but that doesn't seem to work in an
>> outline view. I can't find any other cell which seems to support both an
>> image and text. Does that mean I need to subclass and create my own?
>>
>>
>>
>> On Wed, Jan 7, 2009 at 4:49 PM, Jelle De Laender <i...@codingmammoth.com
>> >wrote:
>>
>>  Did you try
>>>
>>> - (NSImage *)iconForFile:(NSString *)*fullPath*
>>> from NSWorkSpace?
>>> *
>>> *
>>>
>>> CodingMammoth
>>> Jelle De Laender
>>> i...@codingmammoth.com
>>>
>>>
>>>
>>> On 07 Jan 2009, at 22:42, David wrote:
>>>
>>> Hello,Is there a way to obtain the icon that finder uses to display for a
>>> file system object? Such things as the folder icon for folders, PDF icon
>>> for
>>> pdfs etc.
>>>
>>> Thanks
>>> _______________________________________________
>>>
>>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>>
>>> 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:
>>> http://lists.apple.com/mailman/options/cocoa-dev/info%40codingmammoth.com
>>>
>>> This email sent to i...@codingmammoth.com
>>>
>>>
>>>
>>>  _______________________________________________
>>
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/rix.rob%40gmail.com
>>
>> This email sent to rix....@gmail.com
>>
>
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to