• 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: Double KVO notification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Double KVO notification


  • Subject: Re: Double KVO notification
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 15 Dec 2008 16:05:58 -0600

On Dec 15, 2008, at 3:48 PM, Randall Meadows wrote:

I'm trying to track down (in a project I inherited, not wrote) why a KVO notification is being sent twice. The reason I care is because, the table contains a variety of types of data, and for one particular type of data I need to do something special when it is selected, and then revert that when any other type of data is selected, and this double-notification is screwing things up.

You can't use KVO that way. There's no way to guarantee you don't get "double" notifications.


Use the table view delegate methods to keep track of the selection, although even then you'll have to tolerate being informed more than once of a given selection being made.

Regards,
Ken

_______________________________________________

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: 
 >Double KVO notification (From: Randall Meadows <email@hidden>)

  • Prev by Date: Re: Docs on Open GL ES
  • Next by Date: CoreData mystery: configuration used to open the store is incompatible...
  • Previous by thread: Double KVO notification
  • Next by thread: CoreData mystery: configuration used to open the store is incompatible...
  • Index(es):
    • Date
    • Thread