Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView delete button



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.