• 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: Sun, 21 Dec 2008 10:53:47 -0500


On Dec 21, 2008, at 09:27, Andreas Mayer wrote:

All these cases somehow involve user errors. If this really is a problem, why not introduce a separate edit mode?
I.e. in browse mode all fields in the detail pane are locked as in *not* editable. To edit anything the user has to enter edit mode (by clicking a button, selecting a menu command etc.). This will unlock the fields in the detail pane and *disable* the master view. That way the user always has to end editing explicitly to change records.

I'm using a similar design, not by locking the fields but setting a "isDirty" flag in the model after the user start editing the record. This hole problem arises when I want to "disable" the master view. I thought using -selectionShouldChangeInTableView will serve this purpose but since it's called twice when returning NO, I have to work around the bug. You pointed me in the right direction though. I could probably just return NO when the record is dirty, perhaps beeping (which will happen twice), which is not as annoying as presenting the same alert two times in a row. Maybe the delegate method - selectionIndexesForProposedSelection: could be a better choice...


Thanks for the idea,

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


  • Follow-Ups:
    • Re: selectionShouldChangeInTableView called twice
      • From: Andreas Mayer <email@hidden>
References: 
 >selectionShouldChangeInTableView called twice (From: Andre Masse <email@hidden>)
 >Re: selectionShouldChangeInTableView called twice (From: Jerry Krinock <email@hidden>)
 >Re: selectionShouldChangeInTableView called twice (From: Andre Masse <email@hidden>)
 >Re: selectionShouldChangeInTableView called twice (From: Andreas Mayer <email@hidden>)

  • Prev by Date: how to create a CIImage object from a given path safely?
  • Next by Date: Re: how to create a CIImage object from a given path safely?
  • Previous by thread: Re: selectionShouldChangeInTableView called twice
  • Next by thread: Re: selectionShouldChangeInTableView called twice
  • Index(es):
    • Date
    • Thread