Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7713365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:51:28+00:00 2026-06-01T01:51:28+00:00

I have properly setup an NSOutlineView with its data source and it’s working great.

  • 0

I have properly setup an NSOutlineView with its data source and it’s working great.

It’s actually a basic File explorer, showing the folder structure of a particular path (folders, subfolders, etc). The subfolders are loaded on demand (when a folder item is expanded only then are its contents loaded, for speed reasons).

What I want is to know HOW I could EASILY add support to what I already have for the ImageAndTextCell class, so that I can put e.g. a folder/file icon next to each entry…

Any help is appreciated. (Please don’t point me to documentation; I’ve studied almost all of it; what I need is advice by some who has done it, so that I just ADD to my existing code; without having to rewrite from scratch or totally change the logic…)

Thanks

Here’s *My Code * (I had some trouble formatting it for SO… so I posted it on Snippet.MX)


Did what suggested and all the outline view items’ names are suddenly NOT appearing…

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:51:29+00:00Added an answer on June 1, 2026 at 1:51 am

    Documentation is your friend but I understand sometime is so huge.

    BTW
    You need to set the ImageAndTextCell for your outline view, you can do it on you window controller init or awakeFromNib method or directly (if needed) on your NSOutlineView subclass.

    On my project I’ve a NSOutlineView subclass as shown below

    // myOutlineView subclass
    
    - (void)awakeFromNib {
        self.imageCell = [[ImageAndTextCell alloc] init];
        [self.imageCell setEditable: NO];
        NSTableColumn* leftColumn = [[self tableColumns] objectAtIndex:0];
        [leftColumn setDataCell: self.imageCell];
    }
    

    Then you need to implement willDisplayCell delegate method where you set the image for your specific column as shown below (folder icon, file txt icon, jpg icon).

    On the code shown below I get it from my singleton VDIconUtils but you can simply return a NSImage

    - (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item {
        [cell setDrawsBackground:NO];
        if ([[tableColumn identifier] isEqualToString:@"mycellname"]) {
            [cell setImage:[[VDIconUtils sharedIconUtils] iconForFolderStatus:fs :16 :[outlineView isItemExpanded:item]]];
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a properly configured http invoker setup and in a working condition. For
Basically I have a website. I have a properly setup sitemap so I assume
I have a problem to write and read properly a CSV file composed of
I am trying to figure out how to properly setup my crossdomain file. Here
SOLVED: Error in template file I have Smarty setup like this: require_once 'smarty/Smarty.class.php'; $smarty
Context I have a very normal setup in my app: an NSOutlineView (backed by
I have setup a property and implement INotifyPropertyChanged like so... public event PropertyChangedEventHandler PropertyChanged;
Here is my setup. In my application delegate, I have a property called currentFoo.
How can I check whether all JavaScript functions have loaded properly on a page?
i asked this question yesterday but it doesnt seem to have asked properly so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.