Re: Inline editing in NSTableViews
Re: Inline editing in NSTableViews
- Subject: Re: Inline editing in NSTableViews
- From: Thomas Castiglione <email@hidden>
- Date: Mon, 14 Oct 2002 16:53:40 +0800
On Monday, October 14, 2002, at 04:07 PM, Phillip Hutchings wrote:
>
How do you set up a NSTableView so that users can double click a cell
>
to edit it? I have cells set to editable, but I can't figure out how
>
to find out when an edit has happened to record the new value. I can't
>
find examples on the internet either.
>
>
According to NSTableView docs selectionShouldChangeInTableView should
>
be used to check edited values for correctness, but this is only
>
called when the row changes, if a user edits multiple items in a row
>
these values aren't saved.
>
>
The text textShouldEndEditing fits the bill perfectly, but how do I
>
find out which cell was edited?
Have a look at the NSTableDataSource protocol - you'll find out that
what you want is to implement
tableView:setObjectValue:forTableColumn:row: in your datasource object.
Which means that you need to have one, if you don't already:)
- Thomas Castiglione
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.