Re: Saving field editor changes
Re: Saving field editor changes
- Subject: Re: Saving field editor changes
- From: Quentin Mathé <email@hidden>
- Date: Mon, 28 Apr 2003 09:23:38 +0200
Le lundi, 28 avr 2003, ` 00:56 Europe/Paris, Pete Yandell a icrit :
Is there any way to get the currently active field editor to submit
its changes (to an NSTableView or NSOutlineView) without ending the
editing?
For example, I double click a table row to start editing it and type a
few characters. Can I programatically convince the field editor to
submit this text to the table view, such that its data source's
tableView:setObjectValue:forTableColumn:row: method is called, without
closing the field editor and changing the first responder?
Implement the delegate method or the notification method :
- (void)controlTextDidChange:(NSNotification *)aNotification
with following code :
[[[outletTableView] datasource] tableView:outletTableView
setObjectValue:[[aNotification objectForKey:@"NSFieldEditor] string]
forTableColumn:[outletTableView editedColumn] row:[outletTableView
editedRow];
I'm not sure it's the solution, but I think it will do the job.
--
Quentin Mathi
email@hidden
_______________________________________________
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.