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 7008599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:45:22+00:00 2026-05-27T21:45:22+00:00

I have a View-based NSOutlineView bound to a NSTreeController. Everything seems to work correctly

  • 0

I have a View-based NSOutlineView bound to a NSTreeController. Everything seems to work correctly until I implement the outlineView:isGroupItem: method in my delegate, then the group header suddenly stopped showing up. Like this

enter image description here

I confirmed that If I were to change the NSOutlineView to cell-based then the group item shows up properly. Similar behavior is also observed for NSTableView. Has anybody else encountered this problem?

  • 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-05-27T21:45:22+00:00Added an answer on May 27, 2026 at 9:45 pm

    Solved it!

    Turned out I had to implement the following method in the NSOutlineView delegate

    - (NSView *)outlineView:(NSOutlineView *)outlineView 
         viewForTableColumn:(NSTableColumn *)tableColumn
                       item:(id)item {
        if ([self outlineView:outlineView isGroupItem:item]) {
            NSString *vId = [[[outlineView tableColumns] objectAtIndex:0] identifier];
            return [outlineView makeViewWithIdentifier:vId owner:self];
        }
        return [outlineView makeViewWithIdentifier:[tableColumn identifier] owner:self];
    }
    

    Apparently, by default view based NSOutlineView generate view for each cell in the table by locating the view with the same identifier as the column. In the case of a group item / group row however, there is no tableColumm associated with that row, therefore the view turns out to be nil and not show up.

    Playing around with apple’s TableViewPlayground sample project really helped! Highly recommended!

    Addendum: In Interface Builder if you add Source List object instead of Outline View, it will add two prototype view rows for you.

    Allowing you to design different looking header and data rows and referring to them in code by their identifier.

    Header Cell:
    Interface Builder > Header Cell
    Data Cell:
    Interface Builder > Data Cell

    You can of course also manually add as many prototype view rows as you like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented a view-based NSOutlineView in my project. I am using floating group
i have view based application, and i want to call a method in superview(parentview)
I have a (new in Lion) view-based NSOutlineView as Sidebar SourceList in my app
I have a flawless functioning view-based NSOutlineView with a proper set-up datasource in my
I have an view-based application where the user can do a lot of customization
I have developed a view based project in Xcode. It is successfully running in
I have an view in my App which has a number of buttons based
I have created an iPhone application based on an OpenGL view. Now I would
I have a Monthly Status database view I need to build a report based
I have a UITabBar in the detail view of my navigation based application. I

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.