Does NSTableView make any guarantees that it won't put a view that has an editing text field in the reuse queue?

I really should know the answer to this, but I don't 😮. If you have an editable text field in a view you return in tableView:viewForTableColumn:row: and that text field is first responder, and the user scrolls, does NSTableView ensure that the cell view that has the text field being edited... when it goes offscreen won't go in the reuse queue, since the text field could send an action on end editing to a target...but the model underneath changed giving potentially unexpected results?


I always take measures to ensure that this doesn't happen (like disabling scrolling when a text field is being edited), but I was wondering is it necessary to do so?


Thanks all.

Answered by Ken Thomases in 209868022

From the Table View Programming Guide:

A cell view is considered to be in use if it:

Has editing in progress, for example, a text field the user is editing


Such a view won't be removed from table view's subviews, even if it's scrolled out of view. Therefore, it won't be put into the reuse queue.

Accepted Answer

From the Table View Programming Guide:

A cell view is considered to be in use if it:

Has editing in progress, for example, a text field the user is editing


Such a view won't be removed from table view's subviews, even if it's scrolled out of view. Therefore, it won't be put into the reuse queue.

Cool, thanks for sharing.

Does NSTableView make any guarantees that it won't put a view that has an editing text field in the reuse queue?
 
 
Q