Re: NSTableView delete button
Re: NSTableView delete button
- Subject: Re: NSTableView delete button
- From: Keith Duncan <email@hidden>
- Date: Sat, 30 Dec 2006 00:03:19 +0000
I mean my idea of a per row delete button. I prototyped the interface
to include a delete button but it threw it off. Having it per row
makes a lot more sense and it keeps the UI clean.
- Keith
On 29 Dec 2006, at 22:00, John Stiles wrote:
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.
_______________________________________________
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