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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:48:20+00:00 2026-05-19T01:48:20+00:00

I have a NSArrayController bound to a NSTableView. With this I have the typical

  • 0

I have a NSArrayController bound to a NSTableView. With this I have the typical Add/Remove buttons.

While Adding an item is very straight forward (I call a method, create an object with default values and add it) I have problems deleting objects from the controller.
I know I can do this the easy way when connecting the button with the remove action from the ArrayController. But this is not what I want. I need to remove the object manually because I have some additional code to process.

Anway, removing objects seems far more complcated then I expected. It already tried:

NSArray *items =  [doToItemsArrayController selectedObjects];
[doToItemsArrayController removeSelectedObjects:items]; 

or

NSIndexSet *iSet = [doToItemsArrayController selectionIndexes];
[doToItemsArrayController removeSelectionIndexes:iSet];

None of them seems to work. How do I remove the selected Object from an NSArrayController with Objective-C code?

  • 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-19T01:48:20+00:00Added an answer on May 19, 2026 at 1:48 am

    You can remove objects using any of these methods. They are independent from the selection.

    – removeObjectAtArrangedObjectIndex:
    – removeObjectsAtArrangedObjectIndexes:
    – remove:
    – removeObject:
    – removeObjects:
    

    If you want to remove the selected object from the content array, then you can get the selected object(s) using the below methods and then plug it into one of the methods mentioned above.

    – selectionIndex
    – selectionIndexes
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an NSTableView which is bound to an NSDictionaryController. I have set this
I have a list of objects displayed in an NSTableView (bound to an NSArrayController).
I have an NSTableView which is bound to an NSArrayController. I would like to
I have an NSTableview which s bound to a NSArrayController. The Table/Arraycontroller contains Core
I have a NSArrayController bound to an NSTableView so the table column like the
I'm having this strange issue where I have an NSArrayController bound to a managedObjectContext
I have an NSTableView bound to an NSArrayController , which is bound to an
I have an NSTableView with columns bound to an NSArrayController . The table view
I have an NSTableView bound to a core-data-backed NSArrayController by binding individual columns to
I have an NSTableView that binds via an NSArrayController to an NSMutableArray. What's in

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.