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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:16:46+00:00 2026-05-24T18:16:46+00:00

In my application, like many Mac applications, I have a source list. At the

  • 0

In my application, like many Mac applications, I have a source list. At the moment this is an NSOutlineView bound to an NSTreeController. I can add items to it pretty easily, and have even been able to duplicate the “source list” appearance, with grey all-caps headers and all. There’s something that evades me, though, and it’s driving me bonkers.

How does one go about adding a child to a specific item in the tree? For instance, let’s say I’ve created an item titled “Cheese”. I’ve already added two children to Cheese, called “Cheddar” and “Swiss”. How can I add “Longhorn Colby” to the list of children now that my initial adding method has finished running?

I’ve googled it, but can’t find a simple, straight answer. From what I can see, though, it’s needlessly complicated and akin to requiring an act of congress to do something as simple as eating breakfast. Please correct me if I’m wrong.

Update:

I don’t believe I’m using subtypes. Up until now, here’s how I’ve been populating my tree:

[treeController addObject:[NSDictionary dictionaryWithObjectsAndKeys:
                               [NSNumber numberWithBool:YES], @"isSourceGroup",
                               @"CHEESE", @"name",
                               [NSArray arrayWithObjects:
                                [NSDictionary dictionaryWithObjectsAndKeys:
                                 @"Cheddar", @"name",
                                 nil],
                                [NSDictionary dictionaryWithObjectsAndKeys:
                                 @"Swiss", @"name",
                                 nil],
                                nil], @"children",
                               nil]];

The “isSourceGroup” bit is used to denote that this item is one of the headers in the outline view.

  • 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-24T18:16:47+00:00Added an answer on May 24, 2026 at 6:16 pm

    Try changing that NSArray to NSMutableArray, and then:

    [treeController insertObject:longhornColbyDict atArrangedObjectIndexPath:[[NSIndexPath indexPathWithIndex:0] indexPathByAddingIndex:0]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In many places in our application we have code like this: using(RAPI rapi =
If I have an Application like this: Class Application { List state1 = new
A small - little question. I have seen many application having buttons like following.
I saw in many application like Zara, Zara Home, D&G.. that instead of using
Like many web applications (business) the customer wants a form that will search across
Anyone know application like network location(mac) for linux,windows.If not i am thinking of developing
I have a databound TextBox in my application like so: (The type of Height
I want to create an application like this: http://collabedit.com/ What is the most efficient
My application works like this. A database(Mysql) where there is a command. The command
I would like to develop Mac applications, but don't want to use XCode. 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.