On Dec 22, 2008, at 12:12, Corbin Dunn wrote:

Sorry for the late reply on this, but just to add what others have said, and to make more sense of what is going on:

When the selection is changing, the tableview is in the middle of tracking the mouse. It sends out the - selectionShouldChangeInTableView: and expects an immediate answer. Showing a non-modal dialog (ie: sheet) at this point can cause problems that you wouldn't expect, specifically, the tableview needs an answer so it can stop processing the mouse event.

So (as others have noted), the best solution is to always save off the target selection, present your Save/Cancel UI (if "dirty"), and after the UI has closed change the selection to the saved off target selection. When your UI is present, you should return NO for selectionShouldChange.

We do have a bug logged for this issue of the double-delegate calling, but you are always welcome to log a new bug report with your test case.

Thanks for the info Corbin.

Andre Masse
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to