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

Double KVO notification


  • Subject: Double KVO notification
  • From: Randall Meadows <email@hidden>
  • Date: Mon, 15 Dec 2008 14:48:55 -0700

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.

Here's the stack trace:

-[CLController observeValueForKeyPath:ofObject:change:context:] at CLController.m:448
NSKVONotify
-[NSObject(NSKeyValueObservingPrivate) _notifyObserversForKeyPath:change:]
-[NSController _notifyObserversForKeyPath:change:]
-[NSController didChangeValueForKey:]
-[NSTreeController _didChangeValuesForArrangedKeys:objectKeys:indexPathKeys:]
-[NSTreeController _selectObjectsAtIndexPathsNoCopy:avoidsEmptySelection:sendObserverNotifications :]
-[NSTreeController _selectObjectsAtIndexPaths:avoidsEmptySelection:sendObserverNotifications :]
-[NSTreeController setSelectionIndexPaths:]
-[NSObject(NSKeyValueCoding) setValue:forKey:]
-[NSObject(NSKeyValueCoding) setValue:forKeyPath:]
-[NSBinder _setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error :]
-[NSBinder setValue:forBinding:error:]
-[NSOutlineViewBinder tableView:didChangeToSelectedRowIndexes:]
-[_NSBindingAdaptor tableView:didChangeToSelectedRowIndexes:]
-[NSTableView _enableSelectionPostingAndPost]
-[NSTableView mouseDown:]
-[NSOutlineView mouseDown:]
-[NSWindow sendEvent:]
-[NSApplication sendEvent:]
-[NSApplication run]
NSApplicationMain
main at main.m:13


Notice my code only shows up at the last call, in response to the notification; the keyPath for each notification is the same.

Can anyone give me any tips on how to track down why this notification is being sent twice?

Thanks!
randy
_______________________________________________

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: Double KVO notification
      • From: Ken Thomases <email@hidden>
  • Prev by Date: NSURLConnection & NSInputStream issue
  • Next by Date: Re: - [NSBitmapImageRep tiffRepresentation] malloc error
  • Previous by thread: Solved - sorta (Was: NSURLConnection & NSInputStream issue)
  • Next by thread: Re: Double KVO notification
  • Index(es):
    • Date
    • Thread