Re: cell editing in tableview

Christiaan Hofman <[email protected]> Thu, 21 Apr 2011 11:27:36 +0200
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Apr 21, 2011, at 7:18, Abhijeet Singh wrote:

> Hi,
> 
> I want to somehow stop my user when he tries to leave the editable cell of table view and tries to select any other control in my window. I have tried cellTextDidEndEditing. But it doesnt work if user doesnt edit the editable cell of my table view. I want to show a message box to user when ever the focus is about to change from my table view to some other control in my window. Do I need to subclass the NSTabelView and override resignFirstResponder and other responder methods. Please suggest..
> 
> Regards
> Abhijeet

What do you mean by "leave"? If you really mean changing the first responder from the table to some other element, without any edit anywhere, you can only do this by overriding resignFirstResponder. However always showing a message when that happens is extremely intrusive, I would strongly advice against doing that. Of course if you want to annoy your users that's your prerogative, but it won't make your app more popular.

Christiaan