Re: NSTableView in a sheet
Re: NSTableView in a sheet
- Subject: Re: NSTableView in a sheet
- From: Itrat Khan <email@hidden>
- Date: Thu, 28 Mar 2002 03:34:44 -0500
On Thursday, March 28, 2002, at 01:20 AM, Pete Yandell wrote:
If I'm currently editing an item in the NSTableView and I click the OK
button on my sheet (which causes the normal orderOut: and endSheet:
calls), the sheet closes without the
tableView:setObjectValue:forTableColumn:row: method being called on my
NSTableView delegate. That means that the data being edited never gets
updated.
In your OK button's action method, use:
[[sender window] makeFirstResponder:nil];
where sender is the parameter to the action (i.e. the button). That will
force the window's field editor to resign its first responder status and
commit any text the user may be editing in the table.
Itrat.
..................................................................
Itrat Khan
Modeless Software, Inc.
http://www.modeless.com
_______________________________________________
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.