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



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:
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>)
 >Re: NSTableView delete button (From: John Stiles <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.