• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTableView delete button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView delete button


  • Subject: Re: NSTableView delete button
  • From: John Stiles <email@hidden>
  • Date: Fri, 29 Dec 2006 14:00:38 -0800

Call [[myTableView selectedRowEnumerator] allObjects] to get a list of selected rows.

Do what you need to do to handle deletion of each selected row. Be careful; once you delete a row, suddenly all the other rows in the table shift upwards and the rest of the row indices are bogus, so you need to figure out exactly what you need to delete before actually modifying the table in any way.

Once finished, call [myTableView reloadData].

I have a file-browserish application which does exactly this. It uses an outline view (looks like the Finder list view) and has a delete button in the toolbar.


On Dec 29, 2006, at 12:53 PM, Keith Duncan wrote:

For the sake of argument how would one implement it?

On 28 Dec 2006, at 23:26, John Stiles wrote:

Scott's critique is 100% correct.
I think a button for deletion should be visible. If you can make space in every single table item, surely you can make space outside the table.


On Dec 28, 2006, at 3:20 PM, Keith Duncan wrote:



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >NSTableView delete button (From: Keith Duncan <email@hidden>)
 >Re: NSTableView delete button (From: Scott Stevenson <email@hidden>)
 >Re: NSTableView delete button (From: Keith Duncan <email@hidden>)
 >Re: NSTableView delete button (From: John Stiles <email@hidden>)
 >Re: NSTableView delete button (From: Keith Duncan <email@hidden>)

  • Prev by Date: Re: what is error -7000 when activating fonts?
  • Next by Date: Re: what is error -7000 when activating fonts?
  • Previous by thread: Re: NSTableView delete button
  • Next by thread: Re: NSTableView delete button
  • Index(es):
    • Date
    • Thread