• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: selectionShouldChangeInTableView called twice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: selectionShouldChangeInTableView called twice


  • Subject: Re: selectionShouldChangeInTableView called twice
  • From: Andre Masse <email@hidden>
  • Date: Mon, 22 Dec 2008 18:23:09 -0500


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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >selectionShouldChangeInTableView called twice (From: Andre Masse <email@hidden>)
 >Re: selectionShouldChangeInTableView called twice (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: Replacing objects
  • Next by Date: Re: NSStream APIs
  • Previous by thread: Re: selectionShouldChangeInTableView called twice
  • Next by thread: Re: selectionShouldChangeInTableView called twice
  • Index(es):
    • Date
    • Thread