Re: NSTableView delete button
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com - Keith On 29 Dec 2006, at 22:00, John Stiles wrote: Once finished, call [myTableView reloadData]. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/site_archiver%40lists.apple... 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. 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. 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Keith Duncan